summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/transform_command_instead_of_shell.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:57 +0000
commit1faea9a6c75f33109e8f66b57b432fdad57b3f46 (patch)
tree4184ce38ac0cf9d5a46bbbae03c87be82927f12b /examples/playbooks/transform_command_instead_of_shell.yml
parentAdding upstream version 6.17.2. (diff)
downloadansible-lint-1faea9a6c75f33109e8f66b57b432fdad57b3f46.tar.xz
ansible-lint-1faea9a6c75f33109e8f66b57b432fdad57b3f46.zip
Adding upstream version 24.6.1.upstream/24.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/playbooks/transform_command_instead_of_shell.yml')
-rw-r--r--examples/playbooks/transform_command_instead_of_shell.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/playbooks/transform_command_instead_of_shell.yml b/examples/playbooks/transform_command_instead_of_shell.yml
new file mode 100644
index 0000000..278f5d7
--- /dev/null
+++ b/examples/playbooks/transform_command_instead_of_shell.yml
@@ -0,0 +1,25 @@
+---
+- name: Fixture
+ hosts: localhost
+ tasks:
+ - name: Shell no pipe
+ ansible.builtin.shell:
+ cmd: echo hello
+ changed_when: false
+
+ - name: Shell with jinja filter
+ ansible.builtin.shell:
+ cmd: echo {{ "hello" | upper }}
+ changed_when: false
+
+ - name: Shell with jinja filter (fqcn)
+ ansible.builtin.shell:
+ cmd: echo {{ "hello" | upper }}
+ changed_when: false
+
+ - name: Command with executable parameter
+ ansible.builtin.shell:
+ cmd: clear
+ args:
+ executable: /bin/bash
+ changed_when: false