diff --git a/create-cont.sh b/create-cont.sh index 3f65a0c..a130ef4 100755 --- a/create-cont.sh +++ b/create-cont.sh @@ -40,10 +40,10 @@ for x in $(seq 0 4); do echo "$(docker inspect --format='{{range .NetworkSetting #sudo ansible-galaxy collection install arista.eos #sudo docker pull registry.iutbeziers.fr/ceosimage:4.29.02F #sudo docker tag registry.iutbeziers.fr/ceosimage:4.29.02F ceosimage:latest -echo "création des containers routers Arista ceos" -sudo yes | sudo /usr/local/bin/docker-topo --create -s /home/ansible/topo-ansible.yaml +#echo "création des containers routers Arista ceos" +#sudo yes | sudo /usr/local/bin/docker-topo --create -s /home/ansible/topo-ansible.yaml #sudo echo "alias ceos1='docker exec -it 3-node_cEOS-1 Cli'" >> /root/.bashrc #sudo echo "alias ceos2='docker exec -it 3-node_cEOS-2 Cli'" >> /root/.bashrc #sudo echo "alias ceos3='docker exec -it 3-node_cEOS-3 Cli'" >> /root/.bashrc -echo "voila le boulot" +echo "voila le boulot est fait !" docker ps -a diff --git a/install_ansible.sh b/install_ansible.sh index d3701da..5b4f0ad 100755 --- a/install_ansible.sh +++ b/install_ansible.sh @@ -13,7 +13,7 @@ else fi fi echo "Install packages" -sudo apt install -y jupyter python3-virtualenv python3-setuptools build-essential libssl-dev libffi-dev python3-dev libkrb5-dev sshpass yamllint python3-pip +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 ] then sudo mkdir /etc/ansible @@ -36,11 +36,21 @@ pip3 install pywinrm pip3 install pywinrm[credssp] pip3 install pywinrm[kerberos] pip3 install molecule[ansible,docker,lint] -pip3 install docker +# pip3 install docker pip3 install ansible-navigator[ansible-core] pip3 install --upgrade git+https://github.com/networkop/docker-topo.git # pip3 ensurepath +#source ~/.bashrc +#source ~/.profile +#ansible-galaxy collection install arista.eos +#ansible-galaxy collection install community.general +echo -e "Install docker-ce" +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 apt update +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose +sudo systemctl enable docker +sudo groupadd docker +sudo usermod -a -G docker $USER source ~/.bashrc -ansible-galaxy collection install arista.eos -ansible-galaxy collection install community.general - +source ~/.profile \ No newline at end of file