We currently use this pattern a lot to pass asymmetrical data into a 
module, like so:

- hosts: localhost
  vars:
    percona_dbs_to_create:
      - name: test1
        encoding: utf8
        collation: utf8_general_ci
        login_host: 192.168.222.2

      - name: test2
        encoding: utf8
        collation: utf8_general_ci

  tasks:
    - name: Create databases
      action: mysql_db
      args: "{{ item }}"
      with_items: percona_dbs_to_create

To make this work in the future, we'd have to redefine the default value of 
login_host for the test2 item in percona_dbs_to_create. That's not bad for 
a small example like this, but gets out of hand quickly when dealing with 
larger data sets that contain a lot more options.

Is there another way to address this situation that I'm missing?

-- 
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/31a1522a-9354-40f5-80a6-ba8b94eecc4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to