Hello,

I'm currently trying to create a module to manage poudriere (which is a 
tool to manage package repository for FreeBSD).

When I use the pkgng module this way, the command pkgng is actually called 
once, and the "name" argument is a list of all values contained in the list 
provided :
- name: sample pkgng
  pkgng: name="{{item}}" state=present
  with_items: [ a, b, c]

But, when I call my poudriere module :
- name: sample poudriere
  poudriere: name="{{item}}" jail=jailname
  with_items: [ a, b, c]
the module is called three times, once per item value.

I assumed that to get the module called only once, all I had to do is to 
declare the "name" argument as of type 'list', but this is not working :
module = AnsibleModule(
  argument_spec = dict(
    name = dict(required=True, type='list'),
    jail = dict(required=True),
  ),
  supports_check_mode = True,
)

In my module, module.params['name'] is actually a list, but it contains a 
single value each time.

What am I missing ?

Thanks,
SD

-- 
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/e26c91cf-e5c4-4ad2-9a02-8899c799a23c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to