Adham_H
(Adham H)
December 16, 2015, 2:59pm
1
Starting to test my roles with ansible 2.0 dev branch
Complex args breaks when using with_ but works with 1.9.X
name : Loop
hosts : all
gather_facts : yes
become : True
vars :
usermanage_groupsdb :
name : “group1”
state : “present”
gid : “5000”
system : “true”
name : “group2”
state : “present”
gid : “5001”
system : “false”
tasks:
debug: var=usermanage_groupsdb
name: groups | Create groups
group:
args: “{{ item }}”
with_items: usermanage_groupsdb
I am not sure if thats a bug or its by design. Since the complex args was not heavily documented.
So I dont want to report it on github unless it is
Regards
Adham
Hi Adham,
see https://github.com/ansible/ansible/issues/13518 , the issue is tagged “v2 milestone”
Regards,
Luca
Adham_H
(Adham H)
December 16, 2015, 10:38pm
3
Hey
That was fast
fixed it 8716bf8021800a18cb8d6cfea3f296ba4f834692
Now I get a “DEPRECATION WARNING”:
`
[DEPRECATION WARNING]: Using variables for task params is unsafe, especially if the variables come from an external source like facts. This
feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
`
`
Adham_H
(Adham H)
December 19, 2015, 7:00pm
5
But, whats the point of having complex args if its not going to be dynamic ?