diff --git a/certbot/files/letsencrypt-auto b/certbot/files/letsencrypt-auto index 2a0cda9b..0e26e29a 100644 --- a/certbot/files/letsencrypt-auto +++ b/certbot/files/letsencrypt-auto @@ -497,7 +497,7 @@ Python36SclIsAvailable() { # Try to enable rh-python36 from SCL if it is necessary and possible. EnablePython36SCL() { - if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then + if "$EXISTS" python3.6 > /dev/null 2>/dev/null; then return 0 fi if [ ! -f /opt/rh/rh-python36/enable ]; then @@ -815,7 +815,7 @@ elif [ -f /etc/redhat-release ]; then unset LE_PYTHON DeterminePythonVersion "NOCRASH" - RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"` + RPM_DIST_NAME=`(. /etc/os-release 2>/dev/null && echo $ID) || echo "unknown"` if [ "$PYVER" -eq 26 -a $(uname -m) != 'x86_64' ]; then # 32 bits CentOS 6 and affiliates are not supported anymore by certbot-auto. @@ -825,7 +825,7 @@ elif [ -f /etc/redhat-release ]; then # Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on # '.' characters (e.g. "8.0" becomes "8"). If the command exits with an # error, RPM_DIST_VERSION is set to "unknown". - RPM_DIST_VERSION=$( (. /etc/os-release 2> /dev/null && echo "$VERSION_ID") | cut -d '.' -f1 || echo "unknown") + RPM_DIST_VERSION=$( (. /etc/os-release 2>/dev/null && echo "$VERSION_ID") | cut -d '.' -f1 || echo "unknown") # If RPM_DIST_VERSION is an empty string or it contains any nonnumeric # characters, the value is unexpected so we set RPM_DIST_VERSION to 0. diff --git a/elasticsearch/tasks/logs.yml b/elasticsearch/tasks/logs.yml index f7e2c0c0..01829dc9 100644 --- a/elasticsearch/tasks/logs.yml +++ b/elasticsearch/tasks/logs.yml @@ -1,7 +1,7 @@ --- - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash check_mode: no diff --git a/etc-git/tasks/main.yml b/etc-git/tasks/main.yml index 5d468f60..37d1c692 100644 --- a/etc-git/tasks/main.yml +++ b/etc-git/tasks/main.yml @@ -33,7 +33,7 @@ - ansible_distribution_major_version is version('10', '>=') - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash failed_when: False diff --git a/evoacme/files/make-csr.sh b/evoacme/files/make-csr.sh index edec8787..0641c1d5 100755 --- a/evoacme/files/make-csr.sh +++ b/evoacme/files/make-csr.sh @@ -112,9 +112,9 @@ openssl_selfsigned() { [ -r "${key}" ] || error "File ${key} is not readable" [ -w "${crt_dir}" ] || error "Directory ${crt_dir} is not writable" if grep -q SAN "${cfg}"; then - "${OPENSSL_BIN}" x509 -req -sha256 -days 365 -in "${csr}" -extensions SAN -extfile "${cfg}" -signkey "${key}" -out "${crt}" 2> /dev/null + "${OPENSSL_BIN}" x509 -req -sha256 -days 365 -in "${csr}" -extensions SAN -extfile "${cfg}" -signkey "${key}" -out "${crt}" 2>/dev/null else - "${OPENSSL_BIN}" x509 -req -sha256 -days 365 -in "${csr}" -signkey "${key}" -out "${crt}" 2> /dev/null + "${OPENSSL_BIN}" x509 -req -sha256 -days 365 -in "${csr}" -signkey "${key}" -out "${crt}" 2>/dev/null fi [ -r "${crt}" ] || error "Something went wrong, ${crt} has not been generated" @@ -126,7 +126,7 @@ openssl_key(){ [ -w "${key_dir}" ] || error "Directory ${key_dir} is not writable" - "${OPENSSL_BIN}" genrsa -out "${key}" "${size}" 2> /dev/null + "${OPENSSL_BIN}" genrsa -out "${key}" "${size}" 2>/dev/null [ -r "${key}" ] || error "Something went wrong, ${key} has not been generated" } diff --git a/evobackup-client/templates/zzz_evobackup.default.sh.j2 b/evobackup-client/templates/zzz_evobackup.default.sh.j2 index 49de9744..fd2be5b4 100644 --- a/evobackup-client/templates/zzz_evobackup.default.sh.j2 +++ b/evobackup-client/templates/zzz_evobackup.default.sh.j2 @@ -124,7 +124,7 @@ pick_server() { if [ -e "${PIDFILE}" ]; then pid=$(cat "${PIDFILE}") # Does process still exist ? - if kill -0 "${pid}" 2> /dev/null; then + if kill -0 "${pid}" 2>/dev/null; then # Killing the childs of evobackup. for ppid in $(pgrep -P "${pid}"); do kill -9 "${ppid}"; diff --git a/evocheck/files/evocheck.sh b/evocheck/files/evocheck.sh index 287982e2..7adf5757 100644 --- a/evocheck/files/evocheck.sh +++ b/evocheck/files/evocheck.sh @@ -109,7 +109,7 @@ is_pack_samba(){ } is_installed(){ for pkg in "$@"; do - dpkg -l "$pkg" 2> /dev/null | grep -q -E '^(i|h)i' || return 1 + dpkg -l "$pkg" 2>/dev/null | grep -q -E '^(i|h)i' || return 1 done } minifirewall_file() { diff --git a/evocheck/tasks/cron.yml b/evocheck/tasks/cron.yml index aac3f927..ecf1e1d0 100644 --- a/evocheck/tasks/cron.yml +++ b/evocheck/tasks/cron.yml @@ -1,7 +1,7 @@ --- - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash failed_when: False diff --git a/evolinux-base/tasks/system.yml b/evolinux-base/tasks/system.yml index 51bcb6e3..53fa243c 100644 --- a/evolinux-base/tasks/system.yml +++ b/evolinux-base/tasks/system.yml @@ -85,7 +85,7 @@ #- name: Customizing /etc/fstab - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash check_mode: no diff --git a/kvm-host/files/kvmstats.sh b/kvm-host/files/kvmstats.sh index cf2416b9..5fa20ccb 100755 --- a/kvm-host/files/kvmstats.sh +++ b/kvm-host/files/kvmstats.sh @@ -65,13 +65,13 @@ do # mem # libvirt stores memory in KiB, POW must be lowered by 1 - virsh dommemstat "$VM" 2> /dev/null | awk 'BEGIN{ret=1}$1~/^actual$/{print $2 / '$((POW / 1024))';ret=0}END{exit ret}' || + virsh dommemstat "$VM" 2>/dev/null | awk 'BEGIN{ret=1}$1~/^actual$/{print $2 / '$((POW / 1024))';ret=0}END{exit ret}' || virsh dumpxml "$VM" | awk -F'[<>]' '$2~/^memory unit/{print $3/'$((POW / 1024))'}' # disk for BLK in $(virsh domblklist "$VM" | sed '1,2d;/-$/d;/^$/d' | awk '{print $1}') do - virsh domblkinfo "$VM" "$BLK" 2> /dev/null + virsh domblkinfo "$VM" "$BLK" 2>/dev/null done | awk '/Physical:/ { size += $2 } END { print int(size / '${POW}') }' # state diff --git a/logstash/tasks/logs.yml b/logstash/tasks/logs.yml index 9eb98c1a..975cd8bc 100644 --- a/logstash/tasks/logs.yml +++ b/logstash/tasks/logs.yml @@ -1,6 +1,6 @@ --- - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash check_mode: no diff --git a/percona/tasks/main.yml b/percona/tasks/main.yml index dc182e10..b14c4876 100644 --- a/percona/tasks/main.yml +++ b/percona/tasks/main.yml @@ -19,7 +19,7 @@ group: root - name: Check if percona-release is installed - shell: "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 diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index b0476edd..80f90232 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -98,7 +98,7 @@ - postfix - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash check_mode: no diff --git a/spamassasin/tasks/main.yml b/spamassasin/tasks/main.yml index 497c4698..a7568391 100644 --- a/spamassasin/tasks/main.yml +++ b/spamassasin/tasks/main.yml @@ -66,7 +66,7 @@ - spamassassin - name: Check if cron is installed - shell: "set -o pipefail && dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'" + shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" args: executable: /bin/bash check_mode: no diff --git a/ssl/tasks/main.yml b/ssl/tasks/main.yml index 36de4b35..3ec71115 100644 --- a/ssl/tasks/main.yml +++ b/ssl/tasks/main.yml @@ -29,7 +29,7 @@ - ssl - name: Check if Haproxy is installed - shell: "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