I want to update INI configuration files. Today, I store my informations in a var file (in group_vars) this way :
# Identity configuration information identity_servers_conf: DEFAULT: admin_token: "{{identity_admin_token}}" verbose: True database: connection: "mysql://{{ identity_db_user }:{{ identity_db_password }}@{{ db_lb_name }}/{{ identity_db }}" token: provider: keystone.token.providers.uuid.Provider driver: keystone.token.persistence.backends.sql.Token In my Ansible task, I use these informations this way: - name: configuration / modify keystone.conf ini file DEFAULT section ini_file: section: DEFAULT dest: /etc/keystone/keystone.conf option: "{{item.key}}" value: "{{item.value}}" with_dict: identity_servers_conf['DEFAULT'] And I duplicate this task for every sections. Is there a way to iterate through my dict file with each "section" parameters, i.e DEFAULT, database, token. In fact, I try to find a way to do a with_dict nested in a with_items loop. -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7ac9ac96-d996-44b7-92c9-f0102dfc45b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.