Fix ansible-lint warning by setting pipefail in shell: tasks

This commit is contained in:
Bert Van Vreckem 2019-06-23 14:24:04 +02:00
parent ff25ce2ebc
commit 932b192c49

View File

@ -22,7 +22,9 @@
tags: samba
- name: Register Samba version
shell: "smbd --version | sed 's/Version //'"
shell: >
set -o nounset -o pipefail -o errexit &&
smbd --version | sed 's/Version //'
register: samba_version
changed_when: false
tags: samba
@ -144,6 +146,7 @@
- name: Create Samba users if they don't exist yet
shell: >
set -o nounset -o pipefail -o errexit &&
(pdbedit --user={{ item.name }} 2>&1 > /dev/null) \
|| (echo {{ item.password }}; echo {{ item.password }}) \
| smbpasswd -s -a {{ item.name }}