forked from evolix/ansible-roles
fix pipefail option for shell invocations
This commit is contained in:
parent
cae0de17df
commit
4d83f25ae6
12 changed files with 36 additions and 4 deletions
|
@ -31,6 +31,7 @@ The **patch** part changes incrementally at each release.
|
|||
|
||||
### Fixed
|
||||
|
||||
* fix pipefail option for shell invocations
|
||||
* ldap: fix edge cases where passwords were not set/get properly
|
||||
* listupgrade: fix wget error + shellcheck cleanup
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
- name: "hold packages (apt)"
|
||||
shell: "set -o pipefail && (dpkg -l {{ item }} 2>/dev/null | grep -q -E '^(i|h)i') && ((apt-mark showhold | grep --quiet {{ item }}) || apt-mark hold {{ item }})"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
register: apt_mark
|
||||
changed_when: "item + ' set on hold.' in apt_mark.stdout"
|
||||
failed_when:
|
||||
|
@ -31,6 +34,9 @@
|
|||
|
||||
- name: "unhold packages (apt)"
|
||||
shell: "set -o pipefail && (dpkg -l {{ item }} 2>/dev/null | grep -q -E '^(i|h)i') && ((apt-mark showhold | grep --quiet {{ item }}) && apt-mark unhold {{ item }})"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
register: apt_mark
|
||||
changed_when: "'Canceled hold on' + item in apt_mark.stdout"
|
||||
failed_when: apt_mark.rc != 0 and not apt_mark.stdout = ''
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
register: is_cron_installed
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
|
|
|
@ -33,8 +33,9 @@
|
|||
|
||||
- name: fetch users list
|
||||
shell: "set -o pipefail && getent passwd | cut -d':' -f 1 | grep -v root"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
|
||||
register: non_root_users_list
|
||||
changed_when: False
|
||||
tags:
|
||||
|
|
|
@ -86,6 +86,9 @@
|
|||
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
---
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
register: is_cron_installed
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
mode: "0644"
|
||||
|
||||
- name: Check if percona-release is installed
|
||||
command: "set -o pipefail && dpkg -l percona-release 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
shell: "set -o pipefail && dpkg -l percona-release 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
register: percona__apt_config_package_installed
|
||||
|
|
|
@ -99,6 +99,9 @@
|
|||
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
register: is_cron_installed
|
||||
|
|
|
@ -67,6 +67,9 @@
|
|||
|
||||
- name: Check if cron is installed
|
||||
shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
check_mode: no
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
register: is_cron_installed
|
||||
|
|
|
@ -29,9 +29,11 @@
|
|||
- ssl
|
||||
|
||||
- name: Check if Haproxy is installed
|
||||
command: "set -o pipefail && dpkg -l haproxy 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
shell: "set -o pipefail && dpkg -l haproxy 2> /dev/null | grep -q -E '^(i|h)i'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: haproxy_check
|
||||
check_mode: False
|
||||
check_mode: no
|
||||
changed_when: False
|
||||
failed_when: False
|
||||
tags:
|
||||
|
|
Loading…
Add table
Reference in a new issue