Skip to content

Commit

Permalink
Add /bin/bash executable to example correct code for pipefail rule (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Perdu committed Sep 19, 2023
1 parent 1cdfc55 commit 14941df
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ansiblelint/rules/risky_shell_pipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ As this requirement does not apply to PowerShell, for shell commands that have
become: false
tasks:
- name: Pipeline with pipefail
ansible.builtin.shell: set -o pipefail && false | cat
ansible.builtin.shell:
cmd: set -o pipefail && false | cat
executable: /bin/bash

- name: Pipeline with pipefail, multi-line
ansible.builtin.shell: |
set -o pipefail # <-- adding this will prevent surprises
false | cat
ansible.builtin.shell:
cmd: |
set -o pipefail # <-- adding this will prevent surprises
false | cat
executable: /bin/bash
```

0 comments on commit 14941df

Please sign in to comment.