add color in comment
This commit is contained in:
parent
901c4931a0
commit
145c2c8dc3
@ -35,7 +35,7 @@ echo "creation des ip des containers dans /etc/hosts"
|
|||||||
echo "################################"
|
echo "################################"
|
||||||
for x in $(seq 0 4); do echo "$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' rocky-$x) rocky-$x" >> /tmp/hosts;done
|
for x in $(seq 0 4); do echo "$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' rocky-$x) rocky-$x" >> /tmp/hosts;done
|
||||||
for x in $(seq 0 4); do echo "$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' debian-$x) debian-$x" >> /tmp/hosts;done
|
for x in $(seq 0 4); do echo "$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' debian-$x) debian-$x" >> /tmp/hosts;done
|
||||||
sudo cp /tmp/host /etc/hosts
|
sudo cat /tmp/hosts >> /etc/hosts
|
||||||
#echo "installation depuis galaxy de la collection arista"
|
#echo "installation depuis galaxy de la collection arista"
|
||||||
#echo "installation de l'image ceos & aliasing routeur"
|
#echo "installation de l'image ceos & aliasing routeur"
|
||||||
#sudo ansible-galaxy collection install arista.eos
|
#sudo ansible-galaxy collection install arista.eos
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bas
|
||||||
|
NC=`\033[m`
|
||||||
|
Red=`\033[1;31m`
|
||||||
|
Blue=`\033[1;34m`
|
||||||
|
|
||||||
if [ ! -f ~/.ssh/id_ed25519.pub ]
|
if [ ! -f ~/.ssh/id_ed25519.pub ]
|
||||||
then
|
then
|
||||||
echo -e "Vous devez installer le package sudo en tant que root et vous rajouter dans le groupe sudo"
|
echo -e '$REDVeuillez créer une clé assymétrique ssh !$NC'
|
||||||
echo -e "usermod -a -G sudo nom_utilisateur"
|
|
||||||
echo -e "Puis revenir en tant que utilisateur"
|
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
if [ $(id -u) -eq 0 ]
|
if [ $(id -u) -eq 0 ]
|
||||||
then
|
then
|
||||||
echo -e "Ce script doit être lancé en tant qu'utilisateur appartenant au groupe sudo"
|
echo -e "$RedCe script doit être lancé en tant qu'utilisateur appartenant au groupe sudo$NC"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Install packages"
|
echo -e "$Red#################################################"
|
||||||
|
echo -e "Install packages"
|
||||||
|
echo -e "#################################################$NC"
|
||||||
sudo apt install -y jupyter python3-virtualenv python3-setuptools build-essential libssl-dev libffi-dev python3-dev libkrb5-dev sshpass yamllint python3-pip apt-transport-https ca-certificates curl gnupg2 software-properties-common
|
sudo apt install -y jupyter python3-virtualenv python3-setuptools build-essential libssl-dev libffi-dev python3-dev libkrb5-dev sshpass yamllint python3-pip apt-transport-https ca-certificates curl gnupg2 software-properties-common
|
||||||
if [ ! -d /etc/ansible ]
|
if [ ! -d /etc/ansible ]
|
||||||
then
|
then
|
||||||
@ -44,7 +48,9 @@ pip3 install --upgrade git+https://github.com/networkop/docker-topo.git
|
|||||||
#source ~/.profile
|
#source ~/.profile
|
||||||
#ansible-galaxy collection install arista.eos
|
#ansible-galaxy collection install arista.eos
|
||||||
#ansible-galaxy collection install community.general
|
#ansible-galaxy collection install community.general
|
||||||
|
echo -e "$Red#################################################"
|
||||||
echo -e "Install docker-ce"
|
echo -e "Install docker-ce"
|
||||||
|
echo -e "#################################################$NC"
|
||||||
sudo curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
sudo curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||||
sudo echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
|
sudo echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@ -54,4 +60,6 @@ sudo systemctl enable docker
|
|||||||
sudo usermod -a -G docker $USER
|
sudo usermod -a -G docker $USER
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
source ~/.profile
|
source ~/.profile
|
||||||
|
echo -e "$Red#################################################"
|
||||||
echo -e "Veuillez vous déconnecter de votre session !"
|
echo -e "Veuillez vous déconnecter de votre session !"
|
||||||
|
echo -e "#################################################$NC"
|
Loading…
x
Reference in New Issue
Block a user