Verified Commit 631e8ba0 authored by Frederik Schwan's avatar Frederik Schwan Committed by Sven-Hendrik Haase
Browse files

fix E306 'Shells that use pipes should set the pipefail option'

parent 73b81ef4
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
hosts: 127.0.0.1 hosts: 127.0.0.1
tasks: tasks:
- name: reencrypt vault key - name: reencrypt vault key
shell: gpg --decrypt --batch --quiet "{{playbook_dir}}/../../misc/vault-password.gpg" | gpg --batch --armor --encrypt --output - {% for userid in root_gpgkeys %}--recipient {{userid}} {% endfor %} | sponge "{{playbook_dir}}/../../misc/vault-password.gpg" shell: set -o pipefail && gpg --decrypt --batch --quiet "{{playbook_dir}}/../../misc/vault-password.gpg" | gpg --batch --armor --encrypt --output - {% for userid in root_gpgkeys %}--recipient {{userid}} {% endfor %} | sponge "{{playbook_dir}}/../../misc/vault-password.gpg"
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
shell: "for type in sha256 md5; do for file in /etc/ssh/ssh_host_*.pub; do ssh-keygen -l -f $file -E $type; done; echo; done" shell: "for type in sha256 md5; do for file in /etc/ssh/ssh_host_*.pub; do ssh-keygen -l -f $file -E $type; done; echo; done"
register: ssh_hostkeys register: ssh_hostkeys
- name: fetch known_hosts - name: fetch known_hosts
shell: "ssh-keyscan 127.0.0.1 2>/dev/null | sed 's#^127.0.0.1#{{ inventory_hostname }}#'" shell: "set -o pipefail && ssh-keyscan 127.0.0.1 2>/dev/null | sed 's#^127.0.0.1#{{ inventory_hostname }}#'"
register: known_hosts register: known_hosts
- name: store hostkeys - name: store hostkeys
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
- name: check if zabbix db contains tables - name: check if zabbix db contains tables
shell: psql -U {{ zabbix_db_user }} {{ zabbix_db_name }} -c '\d' | grep -P '\(\d+ rows\)' shell: set -o pipefail && psql -U {{ zabbix_db_user }} {{ zabbix_db_name }} -c '\d' | grep -P '\(\d+ rows\)'
become_user: zabbix-server become_user: zabbix-server
become: yes become: yes
register: table_is_populated register: table_is_populated
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment