Push Project :

- Terraform ⚙️ : Instance creation
- Ansible 🛠️ : ContainerLab installation
This commit is contained in:
Damien A
2023-11-05 17:32:26 +01:00
parent a2484bca4d
commit 78322ee157
7 changed files with 188 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
---
- hosts: all
become: yes
tasks:
- name: Install required system packages
apt:
pkg:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- python3-pip
- virtualenv
- python3-setuptools
- git
state: latest
update_cache: true
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu focal stable
state: present
- name: Update apt and install docker-ce
apt:
name: docker-ce
state: latest
update_cache: true
- name: Add the current user to the docker group
user:
name: "{{ ansible_user_id }}"
group: docker
- name: Install ContainerLab
shell: |
curl -sL https://get.containerlab.dev | sudo bash
args:
creates: /usr/local/bin/containerlab