I think my issue is that I'm trying to get with_items to do too much. But
when I use user.uniq instead of with_items, I'm getting a similar error.
I'm really not understanding what approach to take. Thanks,
Here is the task:
- name: Create New Version Directories in User's Home Dir
file: path={{ home_path }}/home/{{ item.uniq }}/validator/{{ item }}
mode=0755 owner={{ item.uniq }} group={{ group_devel }} state=directory
with_items:
- "{{ user }}"
- "{{ validator_ver }}"
- "{{ validator_ver }}/log"
- "{{ validator_ver }}/config"
Here is the relevant var from the var/main.yml
user:
- { name: "HeyYou", uniq: "myself", validator_port: "1078" }
Here is the error:
TASK [netiq-validator : Create New Version Directories in User's Home Dir]
*****
--- before
+++ after
@@ -1,4 +1,4 @@
{
"path": "/home/myself/validator/{u'validator_port': u'1078', u'uniq':
u'myself', u'name': u'HeyYou'}",
- "state": "absent"
+ "state": "directory"
}
changed: [p-idm-bot1] => (item={u'validator_port': u'1078', u'uniq': u'
myself', u'name': u'HeyYou'})
fatal: [p-idm-bot1]: FAILED! => {"failed": true, "msg": "the field 'args'
has an invalid value, which appears to include a variable that is
undefined. The error was: 'float object' has no attribute 'uniq'\n\nThe
error appears to have been in 'ansible/roles/netiq-validator/tasks/main.yml':
line 17, column 3, but may\nbe elsewhere in the file depending on the exact
syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create
New Version Directories in User's Home Dir\n ^ here\n"}
--
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/e782c460-5ccf-483c-8f9b-c5716de57fe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.