corrected defaults for cloudstack.ini and zones

This commit is contained in:
milkmix 2019-03-19 18:16:56 +01:00
parent 1519bf11fe
commit f2155e7539
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@
algo_region: >-
{% if region is defined %}{{ region }}
{%- elif _algo_region.user_input is defined and _algo_region.user_input != "" %}{{ cs_zones[_algo_region.user_input | int -1 ]['name'] }}
{%- else %}{{ cs_zones[default_region | int - 1]['name'] }}{% endif %}
{%- else %}{{ cs_zones[default_zone | int - 1]['name'] }}{% endif %}
- name: Security group created
cs_securitygroup:
@ -62,7 +62,7 @@
environment:
PYTHONPATH: "{{ cloudstack_venv }}/lib/python2.7/site-packages/"
CLOUDSTACK_CONFIG: "{{ _cs_config }}"
CLOUDSTACK_REGION: "{{ _cs_region.user_input }}"
CLOUDSTACK_REGION: "{% if _cs_region.user_input == '' %}{{ 'exoscale' }}{% else %}{{ _cs_region.user_input }}{% endif %}"
rescue:
- debug: var=fail_hint

View file

@ -20,7 +20,7 @@
- pause:
prompt: |
Specify region to use in cloudstack.ini_file
[default]
[exoscale]
register: _cs_region
- name: Parse zones from output
@ -48,6 +48,6 @@
Enter the number of your desired zone
[{{ default_zone }}]
register: _algo_region
when: region is undefined
when: region is undefined
environment:
PYTHONPATH: "{{ cloudstack_venv }}/lib/python2.7/site-packages/"