]> git.immae.eu Git - github/fretlink/docker-ansible.git/blob - mini-debian8/install-ansible.sh
Add: Debian 9 ("Stretch") support.
[github/fretlink/docker-ansible.git] / mini-debian8 / install-ansible.sh
1 #!/bin/sh
2 #
3 # Simple wrapper for installing ansible
4 #
5
6
7 export DEBIAN_FRONTEND=noninteractive
8
9
10 echo "===> Adding backports..."
11
12 mkdir -p /etc/apt/sources.list.d/
13 echo "deb http://ftp.debian.org/debian jessie-backports main" | tee -a /etc/apt/sources.list.d/jessie-backports.list
14
15
16
17 echo "===> Adding prerequisites..."
18
19 apt-get update -y
20 cat ___APT_INSTALL_LIST | \
21 while read ITEM; do
22 apt-get install -y $ITEM
23 done
24
25
26
27 echo "===> Installing Ansible..."
28 apt-get -t jessie-backports install -y ansible
29
30
31
32 echo "===> Adding hosts for convenience..." && \
33 mkdir -p /etc/ansible && \
34 echo 'localhost' > /etc/ansible/hosts