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 }}"