88 lines
2.8 KiB
YAML
88 lines
2.8 KiB
YAML
---
|
|
- name: Get vif_plugging_fatal value from nova.conf
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ nova_config_file }}"
|
|
section: DEFAULT
|
|
key: "{{ vif_plugging_fatal_check }}"
|
|
ignore_missing_file: true
|
|
register: vif_plugging_fatal_value
|
|
|
|
- name: Get vif_plugging_timeout value from nova.conf
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ nova_config_file }}"
|
|
section: DEFAULT
|
|
key: "{{ vif_plugging_timeout_check }}"
|
|
ignore_missing_file: true
|
|
register: vif_plugging_timeout_value
|
|
|
|
- name: Ensure vif plugging timeout minimum
|
|
fail:
|
|
msg: "vif_plugging_timeout is below minimum value. Minimum: {{ vif_plugging_timeout_value_min|int }}. Current value: {{ vig_plugging_timeout_value }}"
|
|
when: "{{ vif_plugging_timeout_value|int < vif_plugging_timeout_value_min|int }}"
|
|
|
|
- name: Ensure vif plugging is fatal
|
|
fail:
|
|
msg: "vif_plugging_fatal should be set to True. Current value: {{ vif_plugging_fatal_value }}."
|
|
when: "not {{ vif_plugging_fatal_value|bool }}"
|
|
|
|
- name: Get auth_url value from hiera
|
|
become: true
|
|
command: hiera -c /etc/puppet/hiera.yaml neutron::server::notifications::auth_url
|
|
ignore_errors: true
|
|
changed_when: false
|
|
register: auth_url
|
|
|
|
- name: Get auth_url value from neutron.conf
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ neutron_config_file }}"
|
|
section: nova
|
|
key: auth_url
|
|
ignore_missing_file: true
|
|
register: neutron_auth_url_result
|
|
|
|
- name: Check [nova]/auth_url setting value from neutron.conf
|
|
fail:
|
|
msg: >-
|
|
[nova]/auth_url from {{ neutron_config_file }} is set to
|
|
{{ neutron_auth_url_result.value or 'None' }}
|
|
but it should be set to {{ auth_url.stdout }}.
|
|
failed_when: "neutron_auth_url_result.value != auth_url.stdout"
|
|
|
|
- name: Get Notify Nova settings values from neutron.conf
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ neutron_config_file }}"
|
|
section: DEFAULT
|
|
key: "{{ item }}"
|
|
ignore_missing_file: true
|
|
register: neutron_notify_nova_result
|
|
with_items:
|
|
- "{{ notify_nova_on_port_data_check }}"
|
|
- "{{ notify_nova_on_port_status_check }}"
|
|
|
|
- name: Check Notify Nova settings values
|
|
fail:
|
|
msg: "Value of {{ item.item }} is set to {{ item.value|bool }}."
|
|
when: not item.value|bool or item.value == None
|
|
with_items: "{{ neutron_notify_nova_result.results }}"
|
|
|
|
- name: Get Tenant Name setting value from neutron.conf
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ neutron_config_file }}"
|
|
section: nova
|
|
key: "{{ tenant_name_check }}"
|
|
ignore_missing_file: true
|
|
register: neutron_tenant_name_result
|
|
|
|
- name: Check Tenant Name settings value
|
|
fail:
|
|
msg: >-
|
|
[nova]/tenant_name from {{ neutron_config_file }} is set to
|
|
{{ neutron_tenant_name_result.value or 'None' }}
|
|
but it should be set to 'service'.
|
|
when: neutron_tenant_name_result.value != 'service'
|