Modify variables during the playbook

7 views
Skip to first unread message

Pujan Shah

unread,
Oct 26, 2016, 12:13:53 PM10/26/16
to Ansible Project
Is it possible to modify nested variables when playbook is executing.

nested_variable:
  - {
      ip: 1.2.3.4,
      port: 80,
      host: 'example.com',
      ssl:
      {
        enabled: true,
        port: 443,
      },
    }

During the playbook based on other conditions I want to change enabled to false.

I tried set_fact module but that does not allow dot in variable name. (Btw couldn't find any explanation for this behavior as well)
I tried set inside jinja2 template but that doesn't work as well.
Reply all
Reply to author
Forward
0 new messages