From cc80573c2f8caa3ac5244a10b60f2f6e90d6e622 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 9 Apr 2018 15:06:52 -0500 Subject: [PATCH] make grep shutup if not found --- scripts/ansible | 2 +- scripts/ansible-2.4.x | 2 +- scripts/ansible-2.5.x | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ansible b/scripts/ansible index e25b099a4..52a27a25d 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -31,7 +31,7 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant pip install --upgrade pip setuptools wheel #EOL just do it pip install ansible==$GOOD_VER --disable-pip-version-check # Parens are optional, but greatly clarify :) - elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then + elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then apt -y install python-pip python-setuptools python-wheel patch apt-add-repository -y ppa:ansible/ansible #apt-add-repository -y ppa:ansible/ansible-2.4 diff --git a/scripts/ansible-2.4.x b/scripts/ansible-2.4.x index b8d0844e1..bebfd3f5b 100755 --- a/scripts/ansible-2.4.x +++ b/scripts/ansible-2.4.x @@ -32,7 +32,7 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant pip install --upgrade pip setuptools wheel #EOL just do it pip install ansible==$GOOD_VER --disable-pip-version-check # Parens are optional, but greatly clarify :) - elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then + elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then apt -y install python-pip python-setuptools python-wheel patch #apt-add-repository -y ppa:ansible/ansible apt-add-repository -y ppa:ansible/ansible-2.4 diff --git a/scripts/ansible-2.5.x b/scripts/ansible-2.5.x index 18708f73b..08a0741bb 100755 --- a/scripts/ansible-2.5.x +++ b/scripts/ansible-2.5.x @@ -31,7 +31,7 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant pip install --upgrade pip setuptools wheel #EOL just do it pip install ansible==$GOOD_VER --disable-pip-version-check # Parens are optional, but greatly clarify :) - elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then + elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then apt -y install python-pip python-setuptools python-wheel patch #apt-add-repository -y ppa:ansible/ansible apt-add-repository -y ppa:ansible/ansible-2.5