Files
AWS-ContainerLab-Deployment/ansible/install_containerlab.yml
Damien A 78322ee157 Push Project :
- Terraform ⚙️ : Instance creation
- Ansible 🛠️ : ContainerLab installation
2023-11-05 17:32:26 +01:00

46 lines
1005 B
YAML

---
- 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