Hey guys, i need to log into a local file the user's group of a specific
user for all the Virtual Machines my Vcenter hosts. Actually my playbook
works, but there's a issue because the data is overwritten on the
destination file, so only the information of the last virtual machine
results.
(i'm new to Ansible, can anyone help me?)
That's the code i worte:
- hosts: all
tasks:
- command: groups user
register: store
- local_action: "copy content='{{inventory_hostname}} {{ store.stdout
}}\n' dest=/etc/ansible/usergroups.txt"
Thank you
--
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/3cc1b7af-29f8-474c-90e9-f5be96e20b31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.