diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:06:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:06:49 +0000 |
commit | 2fe34b6444502079dc0b84365ce82dbc92de308e (patch) | |
tree | 8fedcab52bbbc3db6c5aa909a88a7a7b81685018 /examples/playbooks/command-check-success.yml | |
parent | Initial commit. (diff) | |
download | ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.tar.xz ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.zip |
Adding upstream version 6.17.2.upstream/6.17.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/playbooks/command-check-success.yml')
-rw-r--r-- | examples/playbooks/command-check-success.yml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/examples/playbooks/command-check-success.yml b/examples/playbooks/command-check-success.yml new file mode 100644 index 0000000..2a8e43d --- /dev/null +++ b/examples/playbooks/command-check-success.yml @@ -0,0 +1,63 @@ +--- +- name: Fixture for no-changed-when + hosts: localhost + tasks: + - name: Command with creates check + ansible.builtin.command: echo blah + args: + creates: Z + + - name: Command with removes check + ansible.builtin.command: echo blah + args: + removes: Z + + - name: Command with changed_when + ansible.builtin.command: echo blah + changed_when: false + + - name: Command with inline creates # noqa: no-free-form + ansible.builtin.command: creates=Z echo blah + + - name: Command with inline removes # noqa: no-free-form + ansible.builtin.command: removes=Z echo blah + + - name: Command with cmd # noqa: fqcn[action-core] + command: + cmd: echo blah + args: + creates: Z + + - name: Use shell with creates check # noqa: fqcn[action-core] command-instead-of-shell + shell: echo blah + args: + creates: Z + + - name: Use shell with removes check # noqa: fqcn[action-core] command-instead-of-shell + shell: echo blah + args: + removes: Z + + - name: Use shell with changed_when # noqa: fqcn[action-core] command-instead-of-shell + shell: echo blah + changed_when: false + + - name: Use shell with inline creates # noqa: fqcn[action-core] no-free-form command-instead-of-shell + shell: creates=Z echo blah + + - name: Use shell with inline removes # noqa: fqcn[action-core] no-free-form command-instead-of-shell + shell: removes=Z echo blah + + - name: Use shell with cmd # noqa: fqcn[action-core] command-instead-of-shell + shell: + cmd: echo blah + args: + creates: Z + +- name: Fixture + hosts: localhost + handlers: + - name: Restart something # noqa: fqcn[action-core] no-changed-when + command: do something + - name: Foo # noqa: fqcn[action-core] deprecated-module + include: handlers/included-handlers.yml |