remove whitespace for stream redirection
This commit is contained in:
parent
6d757f971e
commit
b8c5ac3097
14 changed files with 19 additions and 19 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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}";
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue