From 9b9da1ffbc43b6982011d3c4602a6e7c03de49cf Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent@modolo.fr>
Date: Fri, 25 Sep 2020 09:40:18 +0200
Subject: [PATCH] update VM init script

---
 deploy.sh               |  2 +-
 install.sh              | 14 --------------
 ubuntu-shellinabox.yaml |  1 -
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/deploy.sh b/deploy.sh
index a650265..aeddce1 100644
--- a/deploy.sh
+++ b/deploy.sh
@@ -28,7 +28,7 @@ fi
 USER_LOGIN=etudiant
 USER_PASSWORD=$( openssl rand -hex 12 )
 
-useradd -m -s /bin/bash -g users -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev ${USER_LOGIN}
+useradd -m -s /bin/bash -g users -G adm,docker,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev ${USER_LOGIN}
 cp /etc/skel/.* /home/${USER_LOGIN}/
 
 passwd ${USER_LOGIN} << EOF
diff --git a/install.sh b/install.sh
index 04bde1f..f75d5ec 100644
--- a/install.sh
+++ b/install.sh
@@ -4,20 +4,6 @@
 # It is used to record a predefined VM-image of the appliance.
 # Otherwise executed first during a cloud deployement in IFB-Biosphere
 
-# Install Ansible
-export DEBIAN_FRONTEND=noninteractive
-APT_OPT=""
-if [ $(lsb_release -is) = "Debian" ]; then
-    apt-get install -y software-properties-common dirmngr
-	if [ $(lsb_release -cs) = "stretch" ]; then apt-add-repository "deb http://deb.debian.org/debian stretch-backports main"; fi
-	APT_OPT="-t $(lsb_release -cs)-backports --allow-unauthenticated"
-    apt-get -y --allow-unauthenticated dist-upgrade
-elif [ $(lsb_release -cs) != "focal" ]; then
-    apt-add-repository -y ppa:ansible/ansible
-fi
-apt-get update
-apt-get install $APT_OPT -y ansible
-
 # Run app playbook
 ansible-playbook -c local -i 127.0.0.1, -b -e 'ansible_python_interpreter=/usr/bin/python3' ubuntu-shellinabox.yaml
 
diff --git a/ubuntu-shellinabox.yaml b/ubuntu-shellinabox.yaml
index f6548db..33bc95d 100644
--- a/ubuntu-shellinabox.yaml
+++ b/ubuntu-shellinabox.yaml
@@ -60,7 +60,6 @@
 
   - name: Configure network
     shell: iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT && iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT && iptables-save
-sudo systemctl restart shellinabox
 
   - name: Enable services
     systemd:
-- 
GitLab