- name: Prepare for Shinken|user user: name={{ item.0.name }} comment={{ item.0.comment }} group={{ item.0.group }} shell={{ item.0.shell }} password={{ item.0.password }} state=present update_password=on_create with_subelements: - users - group---users: - name: shinken comment: - "Shinken.user" group: - "shinken" shell: - "/bin/bash" password: - "$6$cGTFMo0u$DPyI81Yn/9lFbAVMtTRy0vSXfn00ZaeBPg754BzDx7Aj6B6WZGicfjOjkeY9upT8HPvKV2voQ1SNuWIF2hfEi/"< TASK: shinken | Prepare for Shinken|user > ------------------------------------------ \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
failed: [192.168.7.200] => (item=({'comment': ['Shinken.user'], 'password': ['$6$cGTFMo0u$DPyI81Yn/9lFbAVMtTRy0vSXfn00ZaeBPg754BzDx7Aj6B6WZGicfjOjkeY9upT8HPvKV2voQ1SNuWIF2hfEi/'], 'shell': ['/bin/bash'], 'name': 'shinken'}, 'shinken')) => {"failed": true, "item": [{"comment": ["Shinken.user"], "name": "shinken", "password": ["$6$cGTFMo0u$DPyI81Yn/9lFbAVMtTRy0vSXfn00ZaeBPg754BzDx7Aj6B6WZGicfjOjkeY9upT8HPvKV2voQ1SNuWIF2hfEi/"], "shell": ["/bin/bash"]}, "shinken"], "name": "shinken", "rc": 3}msg: useradd: invalid shell '[/bin/bash]'
FATAL: all hosts have already failed -- aborting
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f811da11-3cc5-4670-ad5f-05ae0cab9ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So what I'm trying to achive is not possible?
How could I create a set of users using the variable's-file instead of "hardcoding" them into the task-file?
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e8aece25-b26c-4bab-a844-3d454c115c1d%40googlegroups.com.
- name: Prepare for Shinken|user user: name={{ item.0.name }} comment={{ item.0.comment }} group={{ item.1 }} shell={{ item.0.shell }} password={{ item.0.password }} state=present update_password=on_create append=yes with_subelements: - users - group---users: - name: shinken comment: "Shinken.user" group: - "shinken" shell: "/bin/bash" password: "$6$cGTFMo0u$DPyI81Yn/9lFbAVMtTRy0vSXfn00ZaeBPg754BzDx7Aj6B6WZGicfjOjkeY9upT8HPvKV2voQ1SNuWIF2hfEi/"--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/242d00c7-b03d-46b6-bda7-b26c8e22cef1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- name: Prepare for Shinken|user
user: name={{ item.name }}
comment={{ item.comment
}}
groups={{ item.groups|join(',')
}}
shell={{ item.shell }}
password={{
item.password }}
state=present
update_password=on_create
with_items: users
---
users:
- name: shinken
comment: "Shinken.user"
groups: