Hello,
I have a task in a play that appends a group to the user running the
playbook. For example, ubuntu user is running the play and does a task like:
- name: Append user group
sudo: yes
user:
name="ubuntu"
append="yes"
groups="othergroup"
A later task then assumes that the ubuntu user can write to directories
with othergroup write access. This is fine if ansible is not running with
ControlMaster enabled since it starts a new SSH connection for every task.
It is a problem when ControlMaster is enabled though because it re-uses the
same connection which doesn't cause the remote SSH process to re-load the
user groups (meaning the process cannot write to the directory as expected).
In the past (using fabric) I could force the SSH connection to close after
this task, but I don't see a way to do that in ansible (which is probably
better since that's a hack). Is there a good way to reload the user's group?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/74109ce5-2541-49a5-90bd-ecbc8a50499e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.