1
0
Fork 0

Improve isen server bootstrap

Signed-off-by: Arnaud M <arnaud.choupinette@mailops.fr>
This commit is contained in:
Arnaud M 2023-03-04 20:51:38 +01:00
parent 47d1e2b488
commit bf2e7cd639
2 changed files with 5 additions and 1 deletions

2
userdata/README.md Normal file
View File

@ -0,0 +1,2 @@
# E.G. to boot 20 instances
openstack server create --user-data ansible101.sh --min 20 --max 20 --flavor d2-4 --image 'Debian 11' --net Ext-Net --key-name arnaud-choupinette isen-

View File

@ -26,7 +26,9 @@ function title.print {
exec &> >(log_handler)
title.print "Permit root login"
sed -i '/PasswordAuthentication no/d' /etc/ssh/sshd_config
echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
sed -i '/PermitRootLogin no/d' /etc/ssh/sshd_config
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
echo '' > /root/.ssh/authorized_keys
echo -e "moutarde42\nmoutarde42" | passwd root
@ -50,7 +52,7 @@ wget https://www.arnaudmorin.fr/tmux.conf -O /root/.tmux.conf
wget https://www.arnaudmorin.fr/plikrc -O /root/.plikrc
wget https://www.arnaudmorin.fr/plik -O /usr/local/bin/plik
chmod +x /usr/local/bin/plik
echo 'if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then tmux new-session -A -s ssh_tmux ;fi' >> /root/.bashrc
#echo 'if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then tmux new-session -A -s ssh_tmux ;fi' >> /root/.bashrc
title.print "Install docker"