diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
commit | d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2 (patch) | |
tree | 794bc3738a00b5e599f06d1f2f6d79048d87ff8e /examples/playbooks/rule-args-module-fail-1.yml | |
parent | Initial commit. (diff) | |
download | ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.tar.xz ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.zip |
Adding upstream version 6.13.1.upstream/6.13.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/playbooks/rule-args-module-fail-1.yml')
-rw-r--r-- | examples/playbooks/rule-args-module-fail-1.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/playbooks/rule-args-module-fail-1.yml b/examples/playbooks/rule-args-module-fail-1.yml new file mode 100644 index 0000000..4c9b51e --- /dev/null +++ b/examples/playbooks/rule-args-module-fail-1.yml @@ -0,0 +1,36 @@ +--- +- name: Fixture to validate module options failure scenarios + hosts: localhost + tasks: + - name: Clone content repository + # module should produce: 'missing required arguments: repo' + ansible.builtin.git: + dest: /home/www + accept_hostkey: true + version: master + update: false + + - name: Enable service httpd and ensure it is not masked + # module should produce: 'missing parameter(s) required by 'enabled': name' + ansible.builtin.systemd: + enabled: true + masked: false + + - name: Enable service httpd and ensure it is not masked + # module should produce: 'Unsupported parameters for ansible.builtin.systemd module: foo. Supported parameters include: no_block, state, daemon_reload (daemon-reload), name (service, unit), force, masked, daemon_reexec (daemon-reexec), scope, enabled.' + ansible.builtin.systemd: + foo: true + + - name: An invalid call of setup module + # setup module in ansible is the only module that has a .. relative + # import that used to cause problems + ansible.builtin.setup: + foo: # this is a nested object which will have the __ injections + # that we later need to clean + bar: true + + - name: Remove deployment dir + # module should produce: 'value of state must be one of: absent, directory, file, hard, link, touch, got: away' + ansible.builtin.file: + path: /opt/software/deployment + state: away |