Skip to content
Snippets Groups Projects
Unverified Commit 9b9da1ff authored by Laurent Modolo's avatar Laurent Modolo
Browse files

update VM init script

parent 32a71dd3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment