Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible ContainerLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
Development Playbooks
Ansible ContainerLab
Commits
f17b5e07
Verified
Commit
f17b5e07
authored
2 years ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Resolve .env issues
parent
44e41884
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+5
-5
5 additions, 5 deletions
README.md
playbook.yml
+0
-2
0 additions, 2 deletions
playbook.yml
roles/containerlab/tasks/main.yml
+3
-3
3 additions, 3 deletions
roles/containerlab/tasks/main.yml
roles/docker/tasks/main.yml
+4
-0
4 additions, 0 deletions
roles/docker/tasks/main.yml
with
12 additions
and
10 deletions
README.md
+
5
−
5
View file @
f17b5e07
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
playbook.yml
+
0
−
2
View file @
f17b5e07
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
roles/containerlab/tasks/main.yml
+
3
−
3
View file @
f17b5e07
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
roles/docker/tasks/main.yml
+
4
−
0
View file @
f17b5e07
...
@@ -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
}}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment