Compare commits
2 Commits
2f19e6faa5
...
a41d3550c5
Author | SHA1 | Date | |
---|---|---|---|
a41d3550c5 | |||
7217b373b6 |
17
roles/docker/tasks/addusers.yml
Normal file
17
roles/docker/tasks/addusers.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
# ===================================================================================================
|
||||
# ? ABOUT
|
||||
# @author : Noah Knegt
|
||||
# @email : personal@noahknegt.com
|
||||
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
|
||||
# @createdOn : 31-03-2023
|
||||
# @description : This will add selected users to the docker group.
|
||||
# ===================================================================================================
|
||||
|
||||
---
|
||||
- name: Add users to the docker group
|
||||
user:
|
||||
name: "{{ item }}"
|
||||
groups: docker
|
||||
append: yes
|
||||
with_items: "{{ docker_users }}"
|
||||
when: docker_users is defined
|
@@ -4,7 +4,7 @@
|
||||
# @email : personal@noahknegt.com
|
||||
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
|
||||
# @createdOn : 31-03-2023
|
||||
# @description : This will check if docker is installed as the latest version.
|
||||
# @description : This will cleanup the docker script from the machine.
|
||||
# ===================================================================================================
|
||||
|
||||
---
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# @email : personal@noahknegt.com
|
||||
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
|
||||
# @createdOn : 31-03-2023
|
||||
# @description : This will download the docker install script.
|
||||
# @description : This will install the docker engine.
|
||||
# ===================================================================================================
|
||||
|
||||
---
|
||||
|
@@ -16,5 +16,8 @@
|
||||
- include_tasks: install.yml
|
||||
when: docker_update is defined
|
||||
|
||||
- include_tasks: addusers.yml
|
||||
when: docker_update is defined
|
||||
|
||||
- include_tasks: cleanup.yml
|
||||
when: docker_update is defined
|
||||
|
@@ -1,2 +1,5 @@
|
||||
---
|
||||
# vars file for docker
|
||||
docker_users:
|
||||
- noahk
|
||||
- root
|
||||
|
Reference in New Issue
Block a user