mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Update ansible-2.4.x
This commit is contained in:
parent
4417f8752c
commit
3801a6a2e4
1 changed files with 2 additions and 16 deletions
|
@ -8,8 +8,6 @@ GOOD_VER="2.4.4" # Ansible version for OLPC XO laptops (pip install).
|
||||||
# On other OS's we attempt to install/upgrade/pin to the latest Ansible 2.4.x
|
# On other OS's we attempt to install/upgrade/pin to the latest Ansible 2.4.x
|
||||||
# WARNING: IIAB 6.6 will likely recommend the very latest Ansible 2.5.x or higher.
|
# WARNING: IIAB 6.6 will likely recommend the very latest Ansible 2.5.x or higher.
|
||||||
CURR_VER="undefined"
|
CURR_VER="undefined"
|
||||||
# FOUND="false" # NOT USED AS OF 2017-12-12
|
|
||||||
# FAMILY="undefined" # NOT USED AS OF 2017-12-12
|
|
||||||
# below are unused for future use
|
# below are unused for future use
|
||||||
# URL="NA"
|
# URL="NA"
|
||||||
|
|
||||||
|
@ -22,32 +20,23 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
||||||
yum -y install git bzip2 file findutils gzip hg svn sudo tar which unzip xz zip libselinux-python
|
yum -y install git bzip2 file findutils gzip hg svn sudo tar which unzip xz zip libselinux-python
|
||||||
yum -y install python-pip python-setuptools python-wheel patch
|
yum -y install python-pip python-setuptools python-wheel patch
|
||||||
yum -y install http://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.4.4.0-1.el7.ans.noarch.rpm
|
yum -y install http://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.4.4.0-1.el7.ans.noarch.rpm
|
||||||
# FOUND="true"
|
|
||||||
# FAMILY="redhat"
|
|
||||||
# elif [ -f /etc/fedora-release ]; then
|
# elif [ -f /etc/fedora-release ]; then
|
||||||
# CURR_VER=`grep VERSION_ID /etc/*elease | cut -d= -f2`
|
# CURR_VER=`grep VERSION_ID /etc/*elease | cut -d= -f2`
|
||||||
# URL=https://github.com/jvonau/iiab/blob/ansible/vars/fedora-$CURR_VER.yml
|
# URL=https://github.com/jvonau/iiab/blob/ansible/vars/fedora-$CURR_VER.yml
|
||||||
# dnf -y install ansible git bzip2 file findutils gzip hg svn sudo tar which unzip xz zip libselinux-python
|
# dnf -y install ansible git bzip2 file findutils gzip hg svn sudo tar which unzip xz zip libselinux-python
|
||||||
# dnf -y install python-pip python-setuptools python-wheel patch
|
# dnf -y install python-pip python-setuptools python-wheel patch
|
||||||
# FOUND="true"
|
|
||||||
# FAMILY="redhat"
|
|
||||||
elif [ -f /etc/olpc-release ]; then
|
elif [ -f /etc/olpc-release ]; then
|
||||||
yum -y install ca-certificates nss
|
yum -y install ca-certificates nss
|
||||||
yum -y install git bzip2 file findutils gzip hg svn sudo tar which unzip xz zip libselinux-python
|
yum -y install git bzip2 file findutils gzip hg svn sudo tar which unzip xz zip libselinux-python
|
||||||
yum -y install python-pip python-setuptools python-wheel patch
|
yum -y install python-pip python-setuptools python-wheel patch
|
||||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||||
# FOUND="true"
|
# Parens are optional, but greatly clarify :)
|
||||||
# FAMILY="olpc"
|
|
||||||
elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then
|
elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then
|
||||||
apt -y install python-pip python-setuptools python-wheel patch
|
apt -y install python-pip python-setuptools python-wheel patch
|
||||||
#apt-add-repository -y ppa:ansible/ansible
|
#apt-add-repository -y ppa:ansible/ansible
|
||||||
apt-add-repository -y ppa:ansible/ansible-2.4
|
apt-add-repository -y ppa:ansible/ansible-2.4
|
||||||
# FOUND="true"
|
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu also contains /etc/debian_version, which would trigger the line just below)
|
||||||
# FAMILY="debian"
|
|
||||||
# fi
|
|
||||||
# if [ ! $FOUND = "true" ]; then
|
|
||||||
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu also contains /etc/debian_version, which would trigger the line just below)
|
|
||||||
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
||||||
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
||||||
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
||||||
|
@ -57,9 +46,6 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
||||||
>> /etc/apt/sources.list.d/iiab-ansible.list
|
>> /etc/apt/sources.list.d/iiab-ansible.list
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
||||||
fi
|
fi
|
||||||
# FOUND="true"
|
|
||||||
# FAMILY="debian"
|
|
||||||
# Parens are optional, but greatly clarify :)
|
|
||||||
else
|
else
|
||||||
echo "WARN: Could not detect distro or distro unsupported"
|
echo "WARN: Could not detect distro or distro unsupported"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue