summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/run-once-fail.yml
blob: 8963196e66d1bc3210a7ea5f3025ccfdf360ad93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
---
- name: "Example with run_once"
  hosts: all
  # strategy: free # noqa: run-once[play] (Corrected code example)
  strategy: free
  gather_facts: false
  tasks:
    # - name: Task with run_once # noqa: run-once[task] (Corrected code example)
    - name: Task with run_once
      ansible.builtin.debug:
        msg: "Test"
      run_once: true # <-- avoid use of strategy as free at play level when using run_once at task level