Skip to content
Snippets Groups Projects
Verified Commit f17b5e07 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Resolve .env issues

parent 44e41884
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ This playbook is used to install ContainerLab on a VM, and test network configur
To run this playbook:
```
ansible-playbook -i $the-vm-you-want-to-configure, playbook.yml -k
ansible-playbook -i $the-vm-you-want-to-configure, playbook.yml
```
Please note the comma after the target.
......@@ -16,10 +16,10 @@ Consider that the Docker repository and the username to login on the box are pas
become: true
vars:
docker:
registry_url: gitlab.geant.net:5005/docker/ci_registry
username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER' }}"
private_token: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN' }}"
nat_user: nat <<<<<<<< username is hardcoded
registry_url: gitlab.geant.net:5005/docker/ci_registry <<<<<<<<<
username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER') }}"
private_token: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN') }}"
nat_user: nat <<<<<<<< hardcoded
roles:
- docker
- containerlab
......
......@@ -4,8 +4,6 @@
vars:
docker:
registry_url: gitlab.geant.net:5005/docker/ci_registry
username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER') }}"
private_token: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN') }}"
nat_user: nat
roles:
- docker
......
......@@ -13,9 +13,9 @@
- name: Log in on Docker repository
community.docker.docker_login:
registry_url: '{{ docker.registry_url }}'
username: '{{ docker.username }}'
password: '{{ docker.private_token }}'
registry_url: 'https://{{ docker.registry_url }}'
username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER') }}"
password: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN') }}"
no_log: true
- name: Pull vMX image from Docker repository
......
......@@ -29,6 +29,10 @@
state: latest
update_cache: true
- name: Install docker-py python package
ansible.builtin.pip:
name: docker-py
- name: Add relevant user to docker group
ansible.builtin.user:
name: "{{ nat_user }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment