From d87d5ff525fac1c6e47979dec7b19ff22b98c5a9 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Wed, 2 Sep 2020 21:21:14 -0400 Subject: [PATCH] Optional list of users to add to docker group --- roles/docker/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index ada88fd..c549d01 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -41,13 +41,13 @@ state: present update_cache: true -- name: Add user to docker group +- name: Add users to docker group user: - name: "{{ docker_user }}" + name: "{{ item }}" groups: docker - skeleton: /etc/skel - shell: /bin/bash append: true + loop: "{{ docker_users }}" + when: users is defined - name: Install docker-compose script: install-compose.sh