From bcc893df7e9dd4f5e6166590446e7120a400a6e8 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Wed, 9 Dec 2020 18:56:32 +0100 Subject: [PATCH] Take docker groups from user entry in inventory --- roles/install-docker/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/install-docker/tasks/main.yml b/roles/install-docker/tasks/main.yml index 4590f0a..e232eb1 100644 --- a/roles/install-docker/tasks/main.yml +++ b/roles/install-docker/tasks/main.yml @@ -79,7 +79,8 @@ - name: Place admin users in docker group user: - name: "{{ item }}" + name: "{{ item.logname }}" groups: docker append: yes - with_items: "{{ docker_users }}" + when: item.docker == true + with_items: "{{ users }}"