better workaround
diff --git a/roles/onos-vm-install/files/onos-setup-playbook.yml b/roles/onos-vm-install/files/onos-setup-playbook.yml
index 7465399..feece0b 100644
--- a/roles/onos-vm-install/files/onos-setup-playbook.yml
+++ b/roles/onos-vm-install/files/onos-setup-playbook.yml
@@ -75,8 +75,10 @@
src=~/onos-docker-compose.yml
dest={{ ansible_user_dir }}/cord/docker-compose.yml
- # become works around group issue
+ # The become here is to work around user not being in the docker group
+ # until the next login, so become it again to reload group membership
- name: Pull docker image for ONOS
become: yes
+ become_user: {{ ansible_user_id }}
command: docker pull onosproject/onos
diff --git a/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml b/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
index 784512e..e472325 100644
--- a/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
+++ b/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
@@ -50,11 +50,10 @@
src=~/.ssh/id_rsa
dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/node_key
-
- # The become here is to work around `ubuntu` not being in the docker group
+ # The become here is to work around user not being in the docker group
# until the next login, so become it again to reload group membership
- name: Pull docker images for XOS
become: yes
- become_user: ubuntu
+ become_user: {{ ansible_user_id }}
command: docker-compose pull chdir="{{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}"