Please ignore the second mail: under bob
--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group,
Hi Michael, I think you want something like:
---
- name: Set up users
hosts: localhost
gather_facts: no
vars:
users:
alice:
name: Alice Appleworth
mail: al...@appleworth.com
pass: ..hash...
bob:
name: Bob Bananarama
mail: b...@bananara
Thanks for your response Michael. I've already read through that page
a few times. It does not work for me because I need an array of users,
and then I need to be able to select which user have access to each
class of server. This method would give every user access to every
machine. I need to be
for that just do :
vars:
allowed_users_host1: ['alice,'bob']
- name: Add user
debug: msg="Add user {{ item.key }} password {{ item.value.pass }}"
with_dict: users
when: item.key in allowed_users_host1
On Fri, Oct 10, 2014 at 2:59 AM, Michael Bushey wrote:
- name: foo
shell: echo "{{ users[item].name }}"
with_items:
- alice
- bob
On 10/10/2014 01:59 AM, Michael Bushey wrote:
Thanks for your response Michael. I've already read through that page
a few times. It does not work for me because I need an array of users,
and then I need to be a
Awesome! Thank you so much for your responses Michael, Brian, and
Adam. Both solutions from Brian and Adam work, thank you! If any of
you get to Los Angeles I owe you a drink!
This is working great:
- name: Users | create .gitconfig
shell: git config --global user.name '{{ item.value.name }