Verified Commit 8e4f27f6 authored by Pilou's avatar Pilou

clouds.yml: don't assume that 'region_name' is set

Depending on the OpenStack provider, 'region_name' can be optional.

Fix this error:

    TASK [firewall : security group] ***
    fatal: [localhost]: FAILED! => {
        "msg": "The task includes an option with an undefined variable.
                The error was: 'dict object' has no attribute 'region_name'
                The error appears to have been in 'playbooks/firewall/roles/firewall/tasks/firewall.yml':
                line 17, column 5, but may be elsewhere in the file depending on the exact syntax problem."
    }
parent 7af8be68
......@@ -11,7 +11,7 @@
user_domain_name: "{{ clouds[openstack_cloud].auth.user_domain_name }}"
username: "{{ clouds[openstack_cloud].auth.username }}"
password: "{{ clouds[openstack_cloud].auth.password }}"
region_name: "{{ clouds[openstack_cloud].region_name }}"
region_name: "{{ clouds[openstack_cloud].region_name|default(omit) }}"
when: false
- name: security group
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment