mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
commit
b618e2cd8e
5 changed files with 26 additions and 62 deletions
|
@ -2,13 +2,11 @@
|
|||
|
||||
echo -e '\nATTEMPTING TO INSTALL THE LATEST (RELEASED VERSION OF) ANSIBLE.'
|
||||
echo -e 'Ensure you'"'"'re online before running this script!'
|
||||
echo -e 'OR: consider scripts/ansible-2.4.x for a "slow food" alternative.\n'
|
||||
echo -e 'OR: consider scripts/ansible-2.4.x or scripts/ansible/2.5.x "slow food" instead.\n'
|
||||
|
||||
GOOD_VER="2.5.0" # Ansible version for OLPC XO laptops (pip install).
|
||||
# On other OS's we install/upgrade to THE latest (released version of) Ansible.
|
||||
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
|
||||
# URL="NA"
|
||||
|
||||
|
@ -21,23 +19,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 python-pip python-setuptools python-wheel patch
|
||||
yum -y install http://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.5.0-1.el7.ans.noarch.rpm
|
||||
# FOUND="true"
|
||||
# FAMILY="redhat"
|
||||
# elif [ -f /etc/fedora-release ]; then
|
||||
# CURR_VER=`grep VERSION_ID /etc/*elease | cut -d= -f2`
|
||||
# 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 python-pip python-setuptools python-wheel patch
|
||||
# FOUND="true"
|
||||
# FAMILY="redhat"
|
||||
elif [ -f /etc/olpc-release ]; then
|
||||
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 python-pip python-setuptools python-wheel patch
|
||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||
# FOUND="true"
|
||||
# FAMILY="olpc"
|
||||
# Parens are optional, but greatly clarify :)
|
||||
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-add-repository -y ppa:ansible/ansible
|
||||
#apt-add-repository -y ppa:ansible/ansible-2.4
|
||||
# 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
|
||||
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
|
||||
|
@ -47,17 +45,6 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
|||
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
||||
fi
|
||||
# FOUND="true"
|
||||
# FAMILY="debian"
|
||||
# Parens are optional, but greatly clarify :)
|
||||
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-add-repository -y ppa:ansible/ansible
|
||||
#apt-add-repository -y ppa:ansible/ansible-2.4
|
||||
# FOUND="true"
|
||||
# FAMILY="debian"
|
||||
# fi
|
||||
# if [ ! $FOUND = "true" ]; then
|
||||
else
|
||||
echo "WARN: Could not detect distro or distro unsupported"
|
||||
exit 1
|
||||
|
@ -76,7 +63,7 @@ else
|
|||
#if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then
|
||||
elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then
|
||||
#echo "Ansible repo(s) found within /etc/apt/sources.list*"
|
||||
echo -e '\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST RELEASED VERSION OF ANSIBLE -- then re-run this script.\n'
|
||||
echo -e '\nMANUAL INTERVENTION URGED: ANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST RELEASED VERSION OF ANSIBLE -- then re-run this script.\n'
|
||||
else
|
||||
echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script"
|
||||
exit 1
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
echo -e '\nATTEMPTING TO INSTALL THE LATEST ANSIBLE 2.4.x'
|
||||
echo -e 'Ensure you'"'"'re online before running this script!'
|
||||
echo -e 'OR: consider scripts/ansible to keep up-to-date with Ansible'"'"'s evolution.\n'
|
||||
echo -e 'OR: consider scripts/ansible-2.5.x\nOR: consider scripts/ansible to keep up-to-date with Ansible'"'"'s evolution.\n'
|
||||
|
||||
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
|
||||
# WARNING: IIAB 6.6 will likely recommend the very latest Ansible 2.5.x or higher.
|
||||
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
|
||||
# URL="NA"
|
||||
|
||||
|
@ -22,23 +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 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
|
||||
# FOUND="true"
|
||||
# FAMILY="redhat"
|
||||
# elif [ -f /etc/fedora-release ]; then
|
||||
# CURR_VER=`grep VERSION_ID /etc/*elease | cut -d= -f2`
|
||||
# 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 python-pip python-setuptools python-wheel patch
|
||||
# FOUND="true"
|
||||
# FAMILY="redhat"
|
||||
elif [ -f /etc/olpc-release ]; then
|
||||
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 python-pip python-setuptools python-wheel patch
|
||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||
# FOUND="true"
|
||||
# FAMILY="olpc"
|
||||
# Parens are optional, but greatly clarify :)
|
||||
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-add-repository -y ppa:ansible/ansible
|
||||
apt-add-repository -y ppa:ansible/ansible-2.4
|
||||
# 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
|
||||
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
|
||||
|
@ -48,17 +46,6 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
|||
>> /etc/apt/sources.list.d/iiab-ansible.list
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
||||
fi
|
||||
# FOUND="true"
|
||||
# FAMILY="debian"
|
||||
# Parens are optional, but greatly clarify :)
|
||||
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-add-repository -y ppa:ansible/ansible
|
||||
apt-add-repository -y ppa:ansible/ansible-2.4
|
||||
# FOUND="true"
|
||||
# FAMILY="debian"
|
||||
# fi
|
||||
# if [ ! $FOUND = "true" ]; then
|
||||
else
|
||||
echo "WARN: Could not detect distro or distro unsupported"
|
||||
exit 1
|
||||
|
@ -77,7 +64,7 @@ else
|
|||
#if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then
|
||||
elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then
|
||||
#echo "Ansible repo(s) found within /etc/apt/sources.list*"
|
||||
echo -e '\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible-2.4/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE 2.4.x -- AND REMOVE ALL SIMILAR LINES -- then re-run this script.\n'
|
||||
echo -e '\nMANUAL INTERVENTION URGED: ANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible-2.4/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE 2.4.x -- AND REMOVE ALL SIMILAR LINES TO ENSURE ANSIBLE UPDATES CLEANLY -- then re-run this script.\n'
|
||||
else
|
||||
echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script"
|
||||
exit 1
|
||||
|
|
|
@ -7,8 +7,6 @@ echo -e 'OR: consider scripts/ansible to keep up-to-date with Ansible'"'"'s evol
|
|||
GOOD_VER="2.5.0" # Ansible version for OLPC XO laptops (pip install).
|
||||
# On other OS's we attempt to install/upgrade/pin to the latest Ansible 2.5.x
|
||||
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
|
||||
# URL="NA"
|
||||
|
||||
|
@ -21,23 +19,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 python-pip python-setuptools python-wheel patch
|
||||
yum -y install http://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.5.0-1.el7.ans.noarch.rpm
|
||||
# FOUND="true"
|
||||
# FAMILY="redhat"
|
||||
# elif [ -f /etc/fedora-release ]; then
|
||||
# CURR_VER=`grep VERSION_ID /etc/*elease | cut -d= -f2`
|
||||
# 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 python-pip python-setuptools python-wheel patch
|
||||
# FOUND="true"
|
||||
# FAMILY="redhat"
|
||||
elif [ -f /etc/olpc-release ]; then
|
||||
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 python-pip python-setuptools python-wheel patch
|
||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||
# FOUND="true"
|
||||
# FAMILY="olpc"
|
||||
# Parens are optional, but greatly clarify :)
|
||||
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-add-repository -y ppa:ansible/ansible
|
||||
apt-add-repository -y ppa:ansible/ansible-2.5
|
||||
# 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
|
||||
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
|
||||
|
@ -47,17 +45,6 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
|||
>> /etc/apt/sources.list.d/iiab-ansible.list
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
|
||||
fi
|
||||
# FOUND="true"
|
||||
# FAMILY="debian"
|
||||
# Parens are optional, but greatly clarify :)
|
||||
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-add-repository -y ppa:ansible/ansible
|
||||
apt-add-repository -y ppa:ansible/ansible-2.5
|
||||
# FOUND="true"
|
||||
# FAMILY="debian"
|
||||
# fi
|
||||
# if [ ! $FOUND = "true" ]; then
|
||||
else
|
||||
echo "WARN: Could not detect distro or distro unsupported"
|
||||
exit 1
|
||||
|
@ -76,7 +63,7 @@ else
|
|||
#if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then
|
||||
elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then
|
||||
#echo "Ansible repo(s) found within /etc/apt/sources.list*"
|
||||
echo -e '\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible-2.5/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE 2.5.x -- AND REMOVE ALL SIMILAR LINES -- then re-run this script.\n'
|
||||
echo -e '\nMANUAL INTERVENTION URGED: ANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible-2.5/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE 2.5.x -- AND REMOVE ALL SIMILAR LINES TO ENSURE ANSIBLE UPDATES CLEANLY -- then re-run this script.\n'
|
||||
else
|
||||
echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script"
|
||||
exit 1
|
||||
|
|
|
@ -94,6 +94,9 @@ cups_enabled: False
|
|||
samba_install: False
|
||||
samba_enabled: False
|
||||
|
||||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
|
||||
# 5-XO-SERVICES
|
||||
|
||||
# Lesser-supported XO services need additional testing. Please contact
|
||||
|
|
Loading…
Reference in a new issue