Testing OpenStack upgrades
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

57 lines
1.5 KiB

---
- name: "pick undercloud SSH shotname from inventory"
set_fact:
undercloud_ssh_hostname: >-
{{ hostvars[undercloud_hostname].ansible_fqdn |
default(undercloud_hostname) }}
when:
- (undercloud_ssh_hostname | length) == 0
- (undercloud_hostname | length) > 0
- undercloud_hostname in hostvars
- name: "list configuration options"
set_fact:
test_conf_yaml: |
{% for section, options in (sections.items() | sort) %}
{% for option, value in (options.items() | sort) %}
- section: "{{ section }}"
option: "{{ option }}"
value: "{{ value }}"
{% endfor %}
{% endfor %}
vars:
sections: "{{ test_default_conf | combine(test_conf, recursive=True) }}"
- name: "generate '{{ test_conf_file }}' file"
ini_file:
path: "{{ test_conf_file }}"
section: "{{ item.section }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: '0644'
when:
- item.section
- item.option
- item.value
loop: "{{ test_conf_yaml | from_yaml | list }}"
- name: "read resulting '{{ test_conf_file }}' file"
command: "cat '{{ test_conf_file }}'"
register: read_test_conf_file
- name: "show resulting '{{ test_conf_file }}' file"
debug: var=read_test_conf_file.stdout_lines
# TODO (fressi): move it to a Tobiko python fixture
- name: Set permissive quotas for instances and cores
shell: |
source "{{ stackrc_file }}"
openstack quota set --instances -1 admin
openstack quota set --cores -1 admin
ignore_errors: yes