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
Branches
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 ...@@ -4,7 +4,7 @@ This playbook is used to install ContainerLab on a VM, and test network configur
To run this playbook: 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. 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 ...@@ -16,10 +16,10 @@ Consider that the Docker repository and the username to login on the box are pas
become: true become: true
vars: vars:
docker: docker:
registry_url: gitlab.geant.net:5005/docker/ci_registry registry_url: gitlab.geant.net:5005/docker/ci_registry <<<<<<<<<
username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER' }}" username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER') }}"
private_token: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN' }}" private_token: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN') }}"
nat_user: nat <<<<<<<< username is hardcoded nat_user: nat <<<<<<<< hardcoded
roles: roles:
- docker - docker
- containerlab - containerlab
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
vars: vars:
docker: docker:
registry_url: gitlab.geant.net:5005/docker/ci_registry 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 nat_user: nat
roles: roles:
- docker - docker
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
- name: Log in on Docker repository - name: Log in on Docker repository
community.docker.docker_login: community.docker.docker_login:
registry_url: '{{ docker.registry_url }}' registry_url: 'https://{{ docker.registry_url }}'
username: '{{ docker.username }}' username: "{{ lookup('ansible.builtin.env', 'GITLAB_USER') }}"
password: '{{ docker.private_token }}' password: "{{ lookup('ansible.builtin.env', 'GITLAB_TOKEN') }}"
no_log: true no_log: true
- name: Pull vMX image from Docker repository - name: Pull vMX image from Docker repository
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
state: latest state: latest
update_cache: true update_cache: true
- name: Install docker-py python package
ansible.builtin.pip:
name: docker-py
- name: Add relevant user to docker group - name: Add relevant user to docker group
ansible.builtin.user: ansible.builtin.user:
name: "{{ nat_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