-
Notifications
You must be signed in to change notification settings - Fork 21
/
pyansible.sh
57 lines (49 loc) · 1.98 KB
/
pyansible.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
apt-get install -y --reinstall \
nano \
git \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
python3-testresources \
python3-pip \
python3-testresources \
python-dev \
python-pip
python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall pip==19.1.1
python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall setuptools
python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall \
pyOpenSSL \
requests \
netaddr \
lxml
python -m pip install --disable-pip-version-check --upgrade --force-reinstall pip==19.1.1
python -m pip install --disable-pip-version-check --upgrade --force-reinstall setuptools
python -m pip install --disable-pip-version-check --upgrade --force-reinstall \
pyOpenSSL \
requests \
netaddr \
lxml
python -m pip install --disable-pip-version-check --upgrade --force-reinstall ansible==${1-2.8.2}
pip install -U --force-reinstall pip==9.0.3
pip3 install -U --force-reinstall pip==9.0.3
pip install --upgrade --force-reinstall pip==9.0.3
pip install PyYAML --disable-pip-version-check
pip install --upgrade pip
pip install docker-py --ignore-installed PyYAML
## Copy pip to /usr/bin
cp /usr/local/bin/pip /usr/bin/pip
cp /usr/local/bin/pip3 /usr/bin/pip3
mkdir -p /etc/ansible/inventories/ 1>/dev/null 2>&1
echo "[local]" >/etc/ansible/inventories/local
echo "127.0.0.1 ansible_connection=local" >>/etc/ansible/inventories/local
### Reference: https://docs.ansible.com/ansible/2.4/intro_configuration.html
echo "[defaults]" >/etc/ansible/ansible.cfg
echo "deprecation_warnings=False" >>/etc/ansible/ansible.cfg
echo "command_warnings = False" >>/etc/ansible/ansible.cfg
echo "callback_whitelist = profile_tasks" >>/etc/ansible/ansible.cfg
echo "inventory = /etc/ansible/inventories/local" >>/etc/ansible/ansible.cfg
# Remove Cows when cowsay installed on main system
echo "nocows = 1" >>/etc/ansible/ansible.cfg
# Variables Need to Line Up with pg.sh (start)
touch /var/plexguide/background.1