Merge pull request #38 from markgoddard/fix-when-warnings
Fix when warnings & add no_log
This commit is contained in:
commit
185d5dd1d8
@ -61,7 +61,7 @@
|
|||||||
'ram': item.RAM | int,
|
'ram': item.RAM | int,
|
||||||
'disk': item.Disk | int}] }}
|
'disk': item.Disk | int}] }}
|
||||||
with_items: "{{ existing_nova_flavors }}"
|
with_items: "{{ existing_nova_flavors }}"
|
||||||
when: "{{ item.Name.startswith(flavor_base_name) }}"
|
when: item.Name.startswith(flavor_base_name)
|
||||||
|
|
||||||
# Build a list of nova flavors to create. Here we offset the flavor name
|
# Build a list of nova flavors to create. Here we offset the flavor name
|
||||||
# index by the length of the relevant existing flavor list. Note that this
|
# index by the length of the relevant existing flavor list. Note that this
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
source {{ venv }}/bin/activate &&
|
source {{ venv }}/bin/activate &&
|
||||||
openstack baremetal node manage {{ item['Name'] }}
|
openstack baremetal node manage {{ item['Name'] }}
|
||||||
with_items: "{{ ironic_nodes }}"
|
with_items: "{{ ironic_nodes }}"
|
||||||
when: "{{ item['Provisioning State'] == 'enroll' }}"
|
when: item['Provisioning State'] == 'enroll'
|
||||||
environment: "{{ openstack_auth_env }}"
|
environment: "{{ openstack_auth_env }}"
|
||||||
|
|
||||||
- name: Ensure ironic nodes are available
|
- name: Ensure ironic nodes are available
|
||||||
@ -48,7 +48,7 @@
|
|||||||
source {{ venv }}/bin/activate &&
|
source {{ venv }}/bin/activate &&
|
||||||
openstack baremetal node provide {{ item['Name'] }}
|
openstack baremetal node provide {{ item['Name'] }}
|
||||||
with_items: "{{ ironic_nodes }}"
|
with_items: "{{ ironic_nodes }}"
|
||||||
when: "{{ item['Provisioning State'] in ['enroll', 'manageable'] }}"
|
when: item['Provisioning State'] in ['enroll', 'manageable']
|
||||||
environment: "{{ openstack_auth_env }}"
|
environment: "{{ openstack_auth_env }}"
|
||||||
|
|
||||||
- name: Get a list of ironic nodes
|
- name: Get a list of ironic nodes
|
||||||
@ -77,4 +77,4 @@
|
|||||||
Failed to make compute node {{ item['Name'] }} available in ironic.
|
Failed to make compute node {{ item['Name'] }} available in ironic.
|
||||||
Provisioning state is {{ item['Provisioning State'] }}.
|
Provisioning state is {{ item['Provisioning State'] }}.
|
||||||
with_items: "{{ ironic_nodes }}"
|
with_items: "{{ ironic_nodes }}"
|
||||||
when: "{{ item['Provisioning State'] != 'available' }}"
|
when: item['Provisioning State'] != 'available'
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
container_image_sets:
|
container_image_sets:
|
||||||
- regexes: "{{ container_image_regexes }}"
|
- regexes: "{{ container_image_regexes }}"
|
||||||
when: "{{ container_image_regexes != '' }}"
|
when: container_image_regexes != ''
|
||||||
|
|
||||||
- name: Display the regexes for container images that will be built
|
- name: Display the regexes for container images that will be built
|
||||||
debug:
|
debug:
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
with_dict: "{{ idrac_network_ips }}"
|
with_dict: "{{ idrac_network_ips }}"
|
||||||
# Don't add hosts that already exist.
|
# Don't add hosts that already exist.
|
||||||
when:
|
when:
|
||||||
- "{{ item.key not in groups['all'] }}"
|
- item.key not in groups['all']
|
||||||
- "{{ item.key | replace('-idrac', '') not in groups['all'] }}"
|
- item.key | replace('-idrac', '') not in groups['all']
|
||||||
- "{{ not compute_node_limit or item.key | replace('-idrac', '') in compute_node_limit_list }}"
|
- not compute_node_limit or item.key | replace('-idrac', '') in compute_node_limit_list
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Ensure compute nodes are present in the Ansible inventory
|
- name: Ensure compute nodes are present in the Ansible inventory
|
||||||
@ -35,5 +35,5 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
ipmi_address: "{{ idrac_network_ips[inventory_hostname] }}"
|
ipmi_address: "{{ idrac_network_ips[inventory_hostname] }}"
|
||||||
# Don't add hosts that already exist.
|
# Don't add hosts that already exist.
|
||||||
when: "{{ not compute_node_limit or inventory_hostname in compute_node_limit_list }}"
|
when: not compute_node_limit or inventory_hostname in compute_node_limit_list
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -8,4 +8,4 @@
|
|||||||
- role: dell-switch-bmp
|
- role: dell-switch-bmp
|
||||||
# This is the Nginx web server on the seed node.
|
# This is the Nginx web server on the seed node.
|
||||||
dell_switch_bmp_http_base_url: "http://{{ provision_oc_net_name | net_ip }}:8080"
|
dell_switch_bmp_http_base_url: "http://{{ provision_oc_net_name | net_ip }}:8080"
|
||||||
when: "{{ dell_switch_bmp_images }}"
|
when: dell_switch_bmp_images
|
||||||
|
@ -24,14 +24,14 @@
|
|||||||
module: copy
|
module: copy
|
||||||
content: "{{ hostvars[inventory_hostname] | to_nice_yaml }}"
|
content: "{{ hostvars[inventory_hostname] | to_nice_yaml }}"
|
||||||
dest: "{{ dump_path }}/{{ inventory_hostname }}.yml"
|
dest: "{{ dump_path }}/{{ inventory_hostname }}.yml"
|
||||||
when: "{{ dump_var_name is not defined }}"
|
when: dump_var_name is not defined
|
||||||
|
|
||||||
- name: Write host variable to file
|
- name: Write host variable to file
|
||||||
local_action:
|
local_action:
|
||||||
module: copy
|
module: copy
|
||||||
content: "{{ hostvars[inventory_hostname][dump_var_name] | to_nice_yaml }}"
|
content: "{{ hostvars[inventory_hostname][dump_var_name] | to_nice_yaml }}"
|
||||||
dest: "{{ dump_path }}/{{ inventory_hostname }}.yml"
|
dest: "{{ dump_path }}/{{ inventory_hostname }}.yml"
|
||||||
when: "{{ dump_var_name is defined }}"
|
when: dump_var_name is defined
|
||||||
|
|
||||||
# - name: Write merged config to file
|
# - name: Write merged config to file
|
||||||
# local_action:
|
# local_action:
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
parents:
|
parents:
|
||||||
- "interface {{ switch_interface_name }}"
|
- "interface {{ switch_interface_name }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when: "{{ switch_type == 'dellos6' }}"
|
when: switch_type == 'dellos6'
|
||||||
|
|
||||||
# The tasks in this block are delegated to the controller.
|
# The tasks in this block are delegated to the controller.
|
||||||
- block:
|
- block:
|
||||||
@ -67,8 +67,8 @@
|
|||||||
delegate_to: "{{ delegate_host }}"
|
delegate_to: "{{ delegate_host }}"
|
||||||
register: arp_result
|
register: arp_result
|
||||||
failed_when:
|
failed_when:
|
||||||
- "{{ arp_result | failed }}"
|
- arp_result | failed
|
||||||
- "{{ 'No ARP entry for ' ~ idrac_default_ip not in arp_result.stdout }}"
|
- "'No ARP entry for ' ~ idrac_default_ip not in arp_result.stdout"
|
||||||
|
|
||||||
# Ansible's until keyword seems to not work nicely with failed_when, causing
|
# Ansible's until keyword seems to not work nicely with failed_when, causing
|
||||||
# the task to fail even though we have specified failed_when: False.
|
# the task to fail even though we have specified failed_when: False.
|
||||||
@ -103,7 +103,7 @@
|
|||||||
- name: Set a fact about whether the iDRAC default IP was reachable
|
- name: Set a fact about whether the iDRAC default IP was reachable
|
||||||
set_fact:
|
set_fact:
|
||||||
idrac_bootstrap_failure: "{{ ping_result.results[0] }}"
|
idrac_bootstrap_failure: "{{ ping_result.results[0] }}"
|
||||||
when: "{{ ping_result.results[0].rc != 0 }}"
|
when: ping_result.results[0].rc != 0
|
||||||
|
|
||||||
- name: Ensure IPMI is enabled on the iDRAC
|
- name: Ensure IPMI is enabled on the iDRAC
|
||||||
command: >
|
command: >
|
||||||
@ -117,7 +117,7 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
loop_var: delegate_host
|
loop_var: delegate_host
|
||||||
delegate_to: "{{ delegate_host }}"
|
delegate_to: "{{ delegate_host }}"
|
||||||
when: "{{ not idrac_bootstrap_failure }}"
|
when: not idrac_bootstrap_failure
|
||||||
register: racadm_ipmi_enable
|
register: racadm_ipmi_enable
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
|
||||||
@ -125,8 +125,8 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
idrac_bootstrap_failure: "{{ racadm_ipmi_enable.results[0] }}"
|
idrac_bootstrap_failure: "{{ racadm_ipmi_enable.results[0] }}"
|
||||||
when:
|
when:
|
||||||
- "{{ not idrac_bootstrap_failure }}"
|
- not idrac_bootstrap_failure
|
||||||
- "{{ racadm_ipmi_enable.results[0].rc != 0 }}"
|
- racadm_ipmi_enable.results[0].rc != 0
|
||||||
|
|
||||||
- name: Ensure the iDRAC IP address is configured
|
- name: Ensure the iDRAC IP address is configured
|
||||||
command: >
|
command: >
|
||||||
@ -140,8 +140,7 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
loop_var: delegate_host
|
loop_var: delegate_host
|
||||||
delegate_to: "{{ delegate_host }}"
|
delegate_to: "{{ delegate_host }}"
|
||||||
when:
|
when: not idrac_bootstrap_failure
|
||||||
- "{{ not idrac_bootstrap_failure }}"
|
|
||||||
register: racadm_setniccfg
|
register: racadm_setniccfg
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
|
||||||
@ -149,14 +148,14 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
idrac_bootstrap_failure: "{{ racadm_setniccfg.results[0] }}"
|
idrac_bootstrap_failure: "{{ racadm_setniccfg.results[0] }}"
|
||||||
when:
|
when:
|
||||||
- "{{ not idrac_bootstrap_failure }}"
|
- not idrac_bootstrap_failure
|
||||||
- "{{ racadm_setniccfg.results[0].rc != 0 }}"
|
- racadm_setniccfg.results[0].rc != 0
|
||||||
|
|
||||||
- name: Append the iDRAC to the successful list on success
|
- name: Append the iDRAC to the successful list on success
|
||||||
set_fact:
|
set_fact:
|
||||||
idrac_bootstrap_success: >
|
idrac_bootstrap_success: >
|
||||||
{{ idrac_bootstrap_success + [idrac_port_description] }}
|
{{ idrac_bootstrap_success + [idrac_port_description] }}
|
||||||
when: "{{ not idrac_bootstrap_failure }}"
|
when: not idrac_bootstrap_failure
|
||||||
|
|
||||||
- name: Append the iDRAC to the failed list on failure
|
- name: Append the iDRAC to the failed list on failure
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -164,7 +163,7 @@
|
|||||||
{{ idrac_bootstrap_failed +
|
{{ idrac_bootstrap_failed +
|
||||||
[{"port description": idrac_port_description,
|
[{"port description": idrac_port_description,
|
||||||
"failure": idrac_bootstrap_failure}] }}
|
"failure": idrac_bootstrap_failure}] }}
|
||||||
when: "{{ idrac_bootstrap_failure }}"
|
when: idrac_bootstrap_failure
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
# Ensure we reconfigure the switch interface.
|
# Ensure we reconfigure the switch interface.
|
||||||
@ -177,14 +176,13 @@
|
|||||||
parents:
|
parents:
|
||||||
- "interface {{ switch_interface_name }}"
|
- "interface {{ switch_interface_name }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when:
|
when: switch_type == 'dellos6'
|
||||||
- "{{ switch_type == 'dellos6' }}"
|
|
||||||
|
|
||||||
when: "{{ idrac_bootstrap_required }}"
|
when: idrac_bootstrap_required
|
||||||
|
|
||||||
- name: Append the iDRAC to the unchanged list when unchanged
|
- name: Append the iDRAC to the unchanged list when unchanged
|
||||||
set_fact:
|
set_fact:
|
||||||
idrac_bootstrap_unchanged: >
|
idrac_bootstrap_unchanged: >
|
||||||
{{ idrac_bootstrap_unchanged + [idrac_port_description] }}
|
{{ idrac_bootstrap_unchanged + [idrac_port_description] }}
|
||||||
run_once: True
|
run_once: True
|
||||||
when: "{{ not idrac_bootstrap_required }}"
|
when: not idrac_bootstrap_required
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
fail:
|
fail:
|
||||||
msg: >
|
msg: >
|
||||||
The iDRAC bootstrap process currently only supports DellOS6 switches.
|
The iDRAC bootstrap process currently only supports DellOS6 switches.
|
||||||
when: "{{ switch_type not in supported_switch_types }}"
|
when: switch_type not in supported_switch_types
|
||||||
|
|
||||||
# 1. Create a VLAN interface on the controller node with IP in the iDRAC
|
# 1. Create a VLAN interface on the controller node with IP in the iDRAC
|
||||||
# default subnet.
|
# default subnet.
|
||||||
@ -119,7 +119,7 @@
|
|||||||
dell_switch_config:
|
dell_switch_config:
|
||||||
- "vlan {{ idrac_bootstrap_vlan }}"
|
- "vlan {{ idrac_bootstrap_vlan }}"
|
||||||
dell_switch_interface_config: "{{ switch_interface_config_bootstrap }}"
|
dell_switch_interface_config: "{{ switch_interface_config_bootstrap }}"
|
||||||
when: "{{ switch_interface_config_bootstrap != {} }}"
|
when: switch_interface_config_bootstrap != {}
|
||||||
|
|
||||||
# 3. For each iDRAC switch port in turn, flip to the temporary VLAN and
|
# 3. For each iDRAC switch port in turn, flip to the temporary VLAN and
|
||||||
# configure the iDRAC's IP address, before returning the port to the iDRAC
|
# configure the iDRAC's IP address, before returning the port to the iDRAC
|
||||||
@ -186,7 +186,7 @@
|
|||||||
dell_switch_config:
|
dell_switch_config:
|
||||||
- "no vlan {{ idrac_bootstrap_vlan }}"
|
- "no vlan {{ idrac_bootstrap_vlan }}"
|
||||||
dell_switch_interface_config: "{{ switch_interface_config_bootstrap }}"
|
dell_switch_interface_config: "{{ switch_interface_config_bootstrap }}"
|
||||||
when: "{{ switch_interface_config_bootstrap != {} }}"
|
when: switch_interface_config_bootstrap != {}
|
||||||
|
|
||||||
# 5. Remove the VLAN interface on the controller node.
|
# 5. Remove the VLAN interface on the controller node.
|
||||||
- name: Ensure the controller bootstrap network is cleaned up
|
- name: Ensure the controller bootstrap network is cleaned up
|
||||||
@ -204,7 +204,7 @@
|
|||||||
- name: Display a list of failed iDRACs
|
- name: Display a list of failed iDRACs
|
||||||
set_fact:
|
set_fact:
|
||||||
idrac_bootstrap_failed_port_descriptions: "{{ idrac_bootstrap_failed | map(attribute='port description') | list }}"
|
idrac_bootstrap_failed_port_descriptions: "{{ idrac_bootstrap_failed | map(attribute='port description') | list }}"
|
||||||
when: "{{ idrac_bootstrap_failed | length > 0 }}"
|
when: idrac_bootstrap_failed | length > 0
|
||||||
|
|
||||||
- name: Display a list of successfully bootstrapped iDRACs
|
- name: Display a list of successfully bootstrapped iDRACs
|
||||||
debug:
|
debug:
|
||||||
@ -217,16 +217,16 @@
|
|||||||
- name: Display a list of failed iDRACs
|
- name: Display a list of failed iDRACs
|
||||||
debug:
|
debug:
|
||||||
var: idrac_bootstrap_failed_port_descriptions
|
var: idrac_bootstrap_failed_port_descriptions
|
||||||
when: "{{ idrac_bootstrap_failed | length > 0 }}"
|
when: idrac_bootstrap_failed | length > 0
|
||||||
|
|
||||||
- name: Display a list of failed iDRACs with debug output for the failed tasks
|
- name: Display a list of failed iDRACs with debug output for the failed tasks
|
||||||
debug:
|
debug:
|
||||||
var: idrac_bootstrap_failed
|
var: idrac_bootstrap_failed
|
||||||
when: "{{ idrac_bootstrap_failed | length > 0 }}"
|
when: idrac_bootstrap_failed | length > 0
|
||||||
|
|
||||||
- name: Fail if there were any iDRAC bootstrapping failures
|
- name: Fail if there were any iDRAC bootstrapping failures
|
||||||
fail:
|
fail:
|
||||||
msg: >
|
msg: >
|
||||||
One or more iDRACs failed to bootstrap, see the list above for
|
One or more iDRACs failed to bootstrap, see the list above for
|
||||||
details.
|
details.
|
||||||
when: "{{ idrac_bootstrap_failed | length > 0 }}"
|
when: idrac_bootstrap_failed | length > 0
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
}]
|
}]
|
||||||
}}
|
}}
|
||||||
with_items: "{{ network_interfaces }}"
|
with_items: "{{ network_interfaces }}"
|
||||||
when: "{{ item|net_cidr != None }}"
|
when: item|net_cidr != None
|
||||||
roles:
|
roles:
|
||||||
- role: ip-allocation
|
- role: ip-allocation
|
||||||
ip_allocation_filename: "{{ kayobe_config_path }}/network-allocation.yml"
|
ip_allocation_filename: "{{ kayobe_config_path }}/network-allocation.yml"
|
||||||
|
@ -46,8 +46,8 @@
|
|||||||
({{ item.description }}) is invalid. Value:
|
({{ item.description }}) is invalid. Value:
|
||||||
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
|
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
|
||||||
when:
|
when:
|
||||||
- "{{ item.required | bool }}"
|
- item.required | bool
|
||||||
- "{{ hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name] }}"
|
- hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name]
|
||||||
with_items:
|
with_items:
|
||||||
- var_name: "kolla_api_interface"
|
- var_name: "kolla_api_interface"
|
||||||
description: "API network interface name"
|
description: "API network interface name"
|
||||||
@ -58,7 +58,7 @@
|
|||||||
- var_name: "kolla_inspector_dnsmasq_interface"
|
- var_name: "kolla_inspector_dnsmasq_interface"
|
||||||
description: "Bare metal introspection network interface name"
|
description: "Bare metal introspection network interface name"
|
||||||
required: "{{ kolla_enable_ironic }}"
|
required: "{{ kolla_enable_ironic }}"
|
||||||
when: "{{ groups['controllers'] | length > 0 }}"
|
when: groups['controllers'] | length > 0
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- config-validation
|
- config-validation
|
||||||
@ -71,7 +71,7 @@
|
|||||||
kolla_internal_fqdn: "{{ internal_net_name | net_fqdn or internal_net_name | net_vip_address }}"
|
kolla_internal_fqdn: "{{ internal_net_name | net_fqdn or internal_net_name | net_vip_address }}"
|
||||||
kolla_external_vip_address: "{{ public_net_name | net_vip_address }}"
|
kolla_external_vip_address: "{{ public_net_name | net_vip_address }}"
|
||||||
kolla_external_fqdn: "{{ public_net_name | net_fqdn or public_net_name | net_vip_address }}"
|
kolla_external_fqdn: "{{ public_net_name | net_fqdn or public_net_name | net_vip_address }}"
|
||||||
when: "{{ kolla_enable_haproxy | bool }}"
|
when: kolla_enable_haproxy | bool
|
||||||
|
|
||||||
- name: Set facts containing the VIP addresses and FQDNs
|
- name: Set facts containing the VIP addresses and FQDNs
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -79,8 +79,7 @@
|
|||||||
kolla_internal_fqdn: "{{ internal_net_name | net_ip(network_host) }}"
|
kolla_internal_fqdn: "{{ internal_net_name | net_ip(network_host) }}"
|
||||||
kolla_external_vip_address: "{{ public_net_name | net_ip(network_host) }}"
|
kolla_external_vip_address: "{{ public_net_name | net_ip(network_host) }}"
|
||||||
kolla_external_fqdn: "{{ public_net_name | net_ip(network_host) }}"
|
kolla_external_fqdn: "{{ public_net_name | net_ip(network_host) }}"
|
||||||
when:
|
when: not kolla_enable_haproxy | bool
|
||||||
- "{{ not kolla_enable_haproxy | bool }}"
|
|
||||||
|
|
||||||
- name: Set facts containing the network host interfaces
|
- name: Set facts containing the network host interfaces
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -107,7 +106,7 @@
|
|||||||
# FIXME: Network host does not have an IP on this network.
|
# FIXME: Network host does not have an IP on this network.
|
||||||
- "{{ provision_wl_net_name }}"
|
- "{{ provision_wl_net_name }}"
|
||||||
- "{{ external_net_name }}"
|
- "{{ external_net_name }}"
|
||||||
when: "{{ item in hostvars[network_host].network_interfaces }}"
|
when: item in hostvars[network_host].network_interfaces
|
||||||
|
|
||||||
- name: Set facts containing the Neutron bridge and interface names
|
- name: Set facts containing the Neutron bridge and interface names
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -126,8 +125,8 @@
|
|||||||
({{ item.description }}) is invalid. Value:
|
({{ item.description }}) is invalid. Value:
|
||||||
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
|
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
|
||||||
when:
|
when:
|
||||||
- "{{ item.required | bool }}"
|
- item.required | bool
|
||||||
- "{{ hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name] }}"
|
- hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name]
|
||||||
with_items:
|
with_items:
|
||||||
- var_name: "kolla_internal_vip_address"
|
- var_name: "kolla_internal_vip_address"
|
||||||
description: "Internal API VIP address"
|
description: "Internal API VIP address"
|
||||||
@ -158,8 +157,8 @@
|
|||||||
({{ item.0.description }}) is invalid. Value:
|
({{ item.0.description }}) is invalid. Value:
|
||||||
"{{ item.1 | default('<undefined>') }}".
|
"{{ item.1 | default('<undefined>') }}".
|
||||||
when:
|
when:
|
||||||
- "{{ item.0.required | bool }}"
|
- item.0.required | bool
|
||||||
- "{{ item.1 is not defined or not item.1 }}"
|
- item.1 is not defined or not item.1
|
||||||
with_subelements:
|
with_subelements:
|
||||||
- - var_name: "kolla_neutron_bridge_names"
|
- - var_name: "kolla_neutron_bridge_names"
|
||||||
value: "{{ kolla_neutron_bridge_names }}"
|
value: "{{ kolla_neutron_bridge_names }}"
|
||||||
@ -170,7 +169,7 @@
|
|||||||
description: "List of Neutron interface names"
|
description: "List of Neutron interface names"
|
||||||
required: True
|
required: True
|
||||||
- value
|
- value
|
||||||
when: "{{ groups['network'] | length > 0 }}"
|
when: groups['network'] | length > 0
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- config-validation
|
- config-validation
|
||||||
@ -188,13 +187,13 @@
|
|||||||
({{ item.description }}) is invalid. Value:
|
({{ item.description }}) is invalid. Value:
|
||||||
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
|
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
|
||||||
when:
|
when:
|
||||||
- "{{ item.required | bool }}"
|
- item.required | bool
|
||||||
- "{{ hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name] }}"
|
- hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name]
|
||||||
with_items:
|
with_items:
|
||||||
- var_name: "kolla_bifrost_network_interface"
|
- var_name: "kolla_bifrost_network_interface"
|
||||||
description: "Bifrost network interface name"
|
description: "Bifrost network interface name"
|
||||||
required: True
|
required: True
|
||||||
when: "{{ groups['seed'] | length > 0 }}"
|
when: groups['seed'] | length > 0
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- config-validation
|
- config-validation
|
||||||
|
@ -18,4 +18,4 @@
|
|||||||
# If a service is not installed, the ansible service module will fail
|
# If a service is not installed, the ansible service module will fail
|
||||||
# with this error message.
|
# with this error message.
|
||||||
- '"Could not find the requested service" not in result.msg'
|
- '"Could not find the requested service" not in result.msg'
|
||||||
when: "{{ kolla_enable_ironic | bool }}"
|
when: kolla_enable_ironic | bool
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
kolla_extra_config: "{{ kolla_extra_config | combine({item.item.name: lookup('template', '{{ item.stat.path }}')}) }}"
|
kolla_extra_config: "{{ kolla_extra_config | combine({item.item.name: lookup('template', '{{ item.stat.path }}')}) }}"
|
||||||
with_items: "{{ stat_result.results }}"
|
with_items: "{{ stat_result.results }}"
|
||||||
when: "{{ item.stat.exists }}"
|
when: item.stat.exists
|
||||||
|
|
||||||
- name: Validate switch configuration for Neutron ML2 genericswitch driver
|
- name: Validate switch configuration for Neutron ML2 genericswitch driver
|
||||||
fail:
|
fail:
|
||||||
@ -110,14 +110,12 @@
|
|||||||
{{ switch_type_to_device_type.keys() | join(', ') }}.
|
{{ switch_type_to_device_type.keys() | join(', ') }}.
|
||||||
with_items: "{{ kolla_neutron_ml2_generic_switch_hosts }}"
|
with_items: "{{ kolla_neutron_ml2_generic_switch_hosts }}"
|
||||||
when: >
|
when: >
|
||||||
{{
|
|
||||||
item not in hostvars or
|
item not in hostvars or
|
||||||
'switch_type' not in hostvars[item] or
|
'switch_type' not in hostvars[item] or
|
||||||
hostvars[item].switch_type not in switch_type_to_device_type or
|
hostvars[item].switch_type not in switch_type_to_device_type or
|
||||||
'ansible_host' not in hostvars[item] or
|
'ansible_host' not in hostvars[item] or
|
||||||
'ansible_user' not in hostvars[item] or
|
'ansible_user' not in hostvars[item] or
|
||||||
'ansible_ssh_pass' not in hostvars[item]
|
'ansible_ssh_pass' not in hostvars[item]
|
||||||
}}
|
|
||||||
tags:
|
tags:
|
||||||
- config-validation
|
- config-validation
|
||||||
|
|
||||||
|
@ -9,12 +9,11 @@
|
|||||||
{{ item.vgname }}. Ensure that each volume group in 'lvm_groups'
|
{{ item.vgname }}. Ensure that each volume group in 'lvm_groups'
|
||||||
has a valid 'disks' list.
|
has a valid 'disks' list.
|
||||||
with_items: "{{ lvm_groups | default([]) }}"
|
with_items: "{{ lvm_groups | default([]) }}"
|
||||||
when:
|
when: not item.disks | default([]) or 'changeme' in item.disks | default([])
|
||||||
- "{{ not item.disks | default([]) or 'changeme' in item.disks | default([]) }}"
|
|
||||||
roles:
|
roles:
|
||||||
- role: mrlesmithjr.manage-lvm
|
- role: mrlesmithjr.manage-lvm
|
||||||
manage_lvm: True
|
manage_lvm: True
|
||||||
become: True
|
become: True
|
||||||
when:
|
when:
|
||||||
- "{{ lvm_groups is defined}}"
|
- lvm_groups is defined
|
||||||
- "{{ lvm_groups | length > 0 }}"
|
- lvm_groups | length > 0
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
Network interface validation failed - no interface configured for
|
Network interface validation failed - no interface configured for
|
||||||
{{ item }}. This should be configured via '{{ item }}_interface'.
|
{{ item }}. This should be configured via '{{ item }}_interface'.
|
||||||
with_items: "{{ ether_interfaces }}"
|
with_items: "{{ ether_interfaces }}"
|
||||||
when: "{{ not item | net_interface }}"
|
when: not item | net_interface
|
||||||
|
|
||||||
- name: Validate bridge interface configuration
|
- name: Validate bridge interface configuration
|
||||||
fail:
|
fail:
|
||||||
@ -23,7 +23,7 @@
|
|||||||
Bridge interface validation failed - no interface configured for
|
Bridge interface validation failed - no interface configured for
|
||||||
{{ item }}. This should be configured via '{{ item }}_interface'.
|
{{ item }}. This should be configured via '{{ item }}_interface'.
|
||||||
with_items: "{{ bridge_interfaces }}"
|
with_items: "{{ bridge_interfaces }}"
|
||||||
when: "{{ not item | net_interface }}"
|
when: not item | net_interface
|
||||||
|
|
||||||
- name: Validate bond interface configuration
|
- name: Validate bond interface configuration
|
||||||
fail:
|
fail:
|
||||||
@ -31,7 +31,7 @@
|
|||||||
Bond interface validation failed - no interface configured for
|
Bond interface validation failed - no interface configured for
|
||||||
{{ item }}. This should be configured via '{{ item }}_interface'.
|
{{ item }}. This should be configured via '{{ item }}_interface'.
|
||||||
with_items: "{{ bond_interfaces }}"
|
with_items: "{{ bond_interfaces }}"
|
||||||
when: "{{ not item | net_interface }}"
|
when: not item | net_interface
|
||||||
tags:
|
tags:
|
||||||
- config-validation
|
- config-validation
|
||||||
|
|
||||||
@ -43,9 +43,9 @@
|
|||||||
become: True
|
become: True
|
||||||
register: nm_result
|
register: nm_result
|
||||||
failed_when:
|
failed_when:
|
||||||
- "{{ nm_result | failed }}"
|
- nm_result | failed
|
||||||
# Ugh, Ansible's service module doesn't handle uninstalled services.
|
# Ugh, Ansible's service module doesn't handle uninstalled services.
|
||||||
- "{{ 'Could not find the requested service' not in nm_result.msg }}"
|
- "'Could not find the requested service' not in nm_result.msg"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: ahuffman.resolv
|
- role: ahuffman.resolv
|
||||||
@ -89,7 +89,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ provision_wl_net_name }}"
|
- "{{ provision_wl_net_name }}"
|
||||||
- "{{ external_net_name }}"
|
- "{{ external_net_name }}"
|
||||||
when: "{{ item in network_interfaces }}"
|
when: item in network_interfaces
|
||||||
|
|
||||||
- name: Update a fact containing veth interfaces
|
- name: Update a fact containing veth interfaces
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
{% if bmc_type is undefined %}is not defined{% else %}{{ bmc_type }}
|
{% if bmc_type is undefined %}is not defined{% else %}{{ bmc_type }}
|
||||||
is not supported{% endif %}.
|
is not supported{% endif %}.
|
||||||
when:
|
when:
|
||||||
- "{{ bios_config or raid_config }}"
|
- bios_config or raid_config
|
||||||
- "{{ bmc_type is undefined or bmc_type not in supported_bmc_types }}"
|
- bmc_type is undefined or bmc_type not in supported_bmc_types
|
||||||
|
|
||||||
- name: Group overcloud hosts by their BMC type
|
- name: Group overcloud hosts by their BMC type
|
||||||
group_by:
|
group_by:
|
||||||
@ -75,7 +75,7 @@
|
|||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
# respected when using delegate_to.
|
# respected when using delegate_to.
|
||||||
ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}"
|
ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}"
|
||||||
when: "{{ bios_or_raid_change | bool }}"
|
when: bios_or_raid_change | bool
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: stackhpc.drac
|
- role: stackhpc.drac
|
||||||
@ -84,7 +84,7 @@
|
|||||||
drac_password: "{{ ipmi_password }}"
|
drac_password: "{{ ipmi_password }}"
|
||||||
drac_bios_config: "{{ bios_config }}"
|
drac_bios_config: "{{ bios_config }}"
|
||||||
drac_raid_config: "{{ raid_config }}"
|
drac_raid_config: "{{ raid_config }}"
|
||||||
when: "{{ bios_or_raid_change | bool }}"
|
when: bios_or_raid_change | bool
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Unset the overcloud nodes' maintenance mode
|
- name: Unset the overcloud nodes' maintenance mode
|
||||||
@ -107,4 +107,4 @@
|
|||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
# respected when using delegate_to.
|
# respected when using delegate_to.
|
||||||
ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}"
|
ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}"
|
||||||
when: "{{ bios_or_raid_change | bool }}"
|
when: bios_or_raid_change | bool
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
Ironic node for {{ inventory_hostname }} is in an unexpected
|
Ironic node for {{ inventory_hostname }} is in an unexpected
|
||||||
initial provision state: {{ initial_provision_state }}. Expected
|
initial provision state: {{ initial_provision_state }}. Expected
|
||||||
states are: {{ deprovisionable_states | join(',') }}.
|
states are: {{ deprovisionable_states | join(',') }}.
|
||||||
when: "{{ initial_provision_state not in deprovisionable_states }}"
|
when: initial_provision_state not in deprovisionable_states
|
||||||
|
|
||||||
- name: Ensure the the ironic node is deprovisioned
|
- name: Ensure the the ironic node is deprovisioned
|
||||||
command: >
|
command: >
|
||||||
@ -82,7 +82,7 @@
|
|||||||
until: "{{ delete_result | success or 'is locked by host' in delete_result.stdout }}"
|
until: "{{ delete_result | success or 'is locked by host' in delete_result.stdout }}"
|
||||||
retries: "{{ ironic_retries }}"
|
retries: "{{ ironic_retries }}"
|
||||||
delay: "{{ ironic_retry_interval }}"
|
delay: "{{ ironic_retry_interval }}"
|
||||||
when: "{{ initial_provision_state != 'available' }}"
|
when: initial_provision_state != 'available'
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
@ -111,8 +111,8 @@
|
|||||||
retries: "{{ wait_available_timeout // wait_available_interval }}"
|
retries: "{{ wait_available_timeout // wait_available_interval }}"
|
||||||
delay: "{{ wait_available_interval }}"
|
delay: "{{ wait_available_interval }}"
|
||||||
when:
|
when:
|
||||||
- "{{ wait_available | bool }}"
|
- wait_available | bool
|
||||||
- "{{ initial_provision_state != 'available' }}"
|
- initial_provision_state != 'available'
|
||||||
changed_when: False
|
changed_when: False
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
@ -124,8 +124,8 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
final_provision_state: "{{ show_result.stdout_lines[1] }}"
|
final_provision_state: "{{ show_result.stdout_lines[1] }}"
|
||||||
when:
|
when:
|
||||||
- "{{ wait_available | bool }}"
|
- wait_available | bool
|
||||||
- "{{ initial_provision_state != 'available' }}"
|
- initial_provision_state != 'available'
|
||||||
|
|
||||||
- name: Fail if the ironic node is not available
|
- name: Fail if the ironic node is not available
|
||||||
fail:
|
fail:
|
||||||
@ -134,6 +134,6 @@
|
|||||||
provision state after deprovisioning. Ironic provision state:
|
provision state after deprovisioning. Ironic provision state:
|
||||||
{{ final_provision_state }}. Expected: available.
|
{{ final_provision_state }}. Expected: available.
|
||||||
when:
|
when:
|
||||||
- "{{ wait_available | bool }}"
|
- wait_available | bool
|
||||||
- "{{ initial_provision_state != 'available' }}"
|
- initial_provision_state != 'available'
|
||||||
- "{{ final_provision_state != 'available' }}"
|
- final_provision_state != 'available'
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
Ironic node for {{ inventory_hostname }} is in an unexpected
|
Ironic node for {{ inventory_hostname }} is in an unexpected
|
||||||
initial provision state: {{ initial_provision_state }}. Expected
|
initial provision state: {{ initial_provision_state }}. Expected
|
||||||
states are: {{ inspectable_states | join(',') }}.
|
states are: {{ inspectable_states | join(',') }}.
|
||||||
when: "{{ initial_provision_state not in inspectable_states }}"
|
when: initial_provision_state not in inspectable_states
|
||||||
|
|
||||||
- name: Ensure the ironic node is manageable
|
- name: Ensure the ironic node is manageable
|
||||||
command: >
|
command: >
|
||||||
@ -75,7 +75,7 @@
|
|||||||
until: "{{ manage_result | success or 'is locked by host' in manage_result.stdout }}"
|
until: "{{ manage_result | success or 'is locked by host' in manage_result.stdout }}"
|
||||||
retries: "{{ ironic_retries }}"
|
retries: "{{ ironic_retries }}"
|
||||||
delay: "{{ ironic_retry_interval }}"
|
delay: "{{ ironic_retry_interval }}"
|
||||||
when: "{{ initial_provision_state != 'manageable' }}"
|
when: initial_provision_state != 'manageable'
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
@ -125,8 +125,7 @@
|
|||||||
until: "{{ not show_result.stdout_lines[1:] | intersect(inspecting_states) }}"
|
until: "{{ not show_result.stdout_lines[1:] | intersect(inspecting_states) }}"
|
||||||
retries: "{{ wait_inspected_timeout // wait_inspected_interval }}"
|
retries: "{{ wait_inspected_timeout // wait_inspected_interval }}"
|
||||||
delay: "{{ wait_inspected_interval }}"
|
delay: "{{ wait_inspected_interval }}"
|
||||||
when:
|
when: wait_inspected | bool
|
||||||
- "{{ wait_inspected | bool }}"
|
|
||||||
changed_when: False
|
changed_when: False
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
@ -137,8 +136,7 @@
|
|||||||
- name: Set a fact containing the final provision state
|
- name: Set a fact containing the final provision state
|
||||||
set_fact:
|
set_fact:
|
||||||
final_provision_state: "{{ show_result.stdout_lines[1] }}"
|
final_provision_state: "{{ show_result.stdout_lines[1] }}"
|
||||||
when:
|
when: wait_inspected | bool
|
||||||
- "{{ wait_inspected | bool }}"
|
|
||||||
|
|
||||||
- name: Fail if any of the nodes are not manageable
|
- name: Fail if any of the nodes are not manageable
|
||||||
fail:
|
fail:
|
||||||
@ -147,5 +145,5 @@
|
|||||||
provision state after inspecting. Ironic provision state:
|
provision state after inspecting. Ironic provision state:
|
||||||
{{ final_provision_state }}. Expected: manageable.
|
{{ final_provision_state }}. Expected: manageable.
|
||||||
when:
|
when:
|
||||||
- "{{ wait_inspected | bool }}"
|
- wait_inspected | bool
|
||||||
- "{{ final_provision_state != 'manageable' }}"
|
- final_provision_state != 'manageable'
|
||||||
|
@ -62,8 +62,8 @@
|
|||||||
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
||||||
in openstack_auth. Have you sourced the environment file?
|
in openstack_auth. Have you sourced the environment file?
|
||||||
when:
|
when:
|
||||||
- "{{ openstack_auth_type == 'password' }}"
|
- openstack_auth_type == 'password'
|
||||||
- "{{ item not in openstack_auth or not openstack_auth[item] }}"
|
- item not in openstack_auth or not openstack_auth[item]
|
||||||
with_items: "{{ openstack_auth_password_required_params }}"
|
with_items: "{{ openstack_auth_password_required_params }}"
|
||||||
tags:
|
tags:
|
||||||
- config-validation
|
- config-validation
|
||||||
@ -79,7 +79,7 @@
|
|||||||
[{'host': item.key,
|
[{'host': item.key,
|
||||||
'interface_config': item.value.switch_interface_config.items()}] }}
|
'interface_config': item.value.switch_interface_config.items()}] }}
|
||||||
with_dict: "{{ hostvars }}"
|
with_dict: "{{ hostvars }}"
|
||||||
when: "{{ item.key in groups[inspector_dell_switch_lldp_workaround_group] }}"
|
when: item.key in groups[inspector_dell_switch_lldp_workaround_group]
|
||||||
|
|
||||||
- name: Update a fact containing Ironic Inspector rules
|
- name: Update a fact containing Ironic Inspector rules
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -90,11 +90,11 @@
|
|||||||
- "{{ all_switch_interfaces }}"
|
- "{{ all_switch_interfaces }}"
|
||||||
- interface_config
|
- interface_config
|
||||||
when:
|
when:
|
||||||
- "{{ item.1.1.description is defined }}"
|
- item.1.1.description is defined
|
||||||
# Ignore VLAN interfaces.
|
# Ignore VLAN interfaces.
|
||||||
- "{{ 'vlan' not in item.1.0 }}"
|
- "'vlan' not in item.1.0"
|
||||||
# Ignore trunk links.
|
# Ignore trunk links.
|
||||||
- "{{ '-trunk' not in item.1.1.description }}"
|
- "'-trunk' not in item.1.1.description"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: ironic-inspector-rules
|
- role: ironic-inspector-rules
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
||||||
in openstack_auth. Have you sourced the environment file?
|
in openstack_auth. Have you sourced the environment file?
|
||||||
when:
|
when:
|
||||||
- "{{ openstack_auth_type == 'password' }}"
|
- openstack_auth_type == 'password'
|
||||||
- "{{ item not in openstack_auth or not openstack_auth[item] }}"
|
- item not in openstack_auth or not openstack_auth[item]
|
||||||
with_items: "{{ openstack_auth_password_required_params }}"
|
with_items: "{{ openstack_auth_password_required_params }}"
|
||||||
tags:
|
tags:
|
||||||
- config-validation
|
- config-validation
|
||||||
|
@ -24,4 +24,4 @@
|
|||||||
type: raw
|
type: raw
|
||||||
os_images_git_elements: "{{ ipa_build_dib_git_elements }}"
|
os_images_git_elements: "{{ ipa_build_dib_git_elements }}"
|
||||||
os_images_upload: False
|
os_images_upload: False
|
||||||
when: "{{ ipa_build_images | bool }}"
|
when: ipa_build_images | bool
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
Ironic node for {{ inventory_hostname }} is in an unexpected
|
Ironic node for {{ inventory_hostname }} is in an unexpected
|
||||||
initial provision state: {{ initial_provision_state }}. Expected
|
initial provision state: {{ initial_provision_state }}. Expected
|
||||||
states are: {{ provisionable_states | join(',') }}.
|
states are: {{ provisionable_states | join(',') }}.
|
||||||
when: "{{ initial_provision_state not in provisionable_states }}"
|
when: initial_provision_state not in provisionable_states
|
||||||
|
|
||||||
- name: Ensure the ironic node is manageable
|
- name: Ensure the ironic node is manageable
|
||||||
command: >
|
command: >
|
||||||
@ -85,7 +85,7 @@
|
|||||||
until: "{{ manage_result | success or 'is locked by host' in manage_result.stdout }}"
|
until: "{{ manage_result | success or 'is locked by host' in manage_result.stdout }}"
|
||||||
retries: "{{ ironic_retries }}"
|
retries: "{{ ironic_retries }}"
|
||||||
delay: "{{ ironic_retry_interval }}"
|
delay: "{{ ironic_retry_interval }}"
|
||||||
when: "{{ initial_provision_state == 'enroll' }}"
|
when: initial_provision_state == 'enroll'
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
@ -109,7 +109,7 @@
|
|||||||
until: "{{ provide_result | success or 'is locked by host' in provide_result.stdout }}"
|
until: "{{ provide_result | success or 'is locked by host' in provide_result.stdout }}"
|
||||||
retries: "{{ ironic_retries }}"
|
retries: "{{ ironic_retries }}"
|
||||||
delay: "{{ ironic_retry_interval }}"
|
delay: "{{ ironic_retry_interval }}"
|
||||||
when: "{{ initial_provision_state in ['enroll', 'manageable'] }}"
|
when: initial_provision_state in ['enroll', 'manageable']
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
@ -120,7 +120,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
bifrost_limit: "{{ bifrost_limit + [item] }}"
|
bifrost_limit: "{{ bifrost_limit + [item] }}"
|
||||||
with_items: "{{ play_hosts }}"
|
with_items: "{{ play_hosts }}"
|
||||||
when: "{{ hostvars[item].initial_provision_state != 'active' }}"
|
when: hostvars[item].initial_provision_state != 'active'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Ensure the ironic nodes are provisioned
|
- name: Ensure the ironic nodes are provisioned
|
||||||
@ -135,7 +135,7 @@
|
|||||||
-e @/etc/bifrost/bifrost.yml
|
-e @/etc/bifrost/bifrost.yml
|
||||||
-e @/etc/bifrost/dib.yml
|
-e @/etc/bifrost/dib.yml
|
||||||
--limit {{ bifrost_limit | join(':') }}'
|
--limit {{ bifrost_limit | join(':') }}'
|
||||||
when: "{{ bifrost_limit }}"
|
when: bifrost_limit
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
# NOTE: Without this, the seed's ansible_host variable will not be
|
# NOTE: Without this, the seed's ansible_host variable will not be
|
||||||
@ -167,8 +167,8 @@
|
|||||||
retries: "{{ wait_active_timeout // wait_active_interval }}"
|
retries: "{{ wait_active_timeout // wait_active_interval }}"
|
||||||
delay: "{{ wait_active_interval }}"
|
delay: "{{ wait_active_interval }}"
|
||||||
when:
|
when:
|
||||||
- "{{ wait_active | bool }}"
|
- wait_active | bool
|
||||||
- "{{ initial_provision_state != 'active' }}"
|
- initial_provision_state != 'active'
|
||||||
changed_when: False
|
changed_when: False
|
||||||
delegate_to: "{{ seed_host }}"
|
delegate_to: "{{ seed_host }}"
|
||||||
vars:
|
vars:
|
||||||
@ -180,8 +180,8 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
final_provision_state: "{{ show_result.stdout_lines[1] }}"
|
final_provision_state: "{{ show_result.stdout_lines[1] }}"
|
||||||
when:
|
when:
|
||||||
- "{{ wait_active | bool }}"
|
- wait_active | bool
|
||||||
- "{{ initial_provision_state != 'active' }}"
|
- initial_provision_state != 'active'
|
||||||
|
|
||||||
- name: Fail if any of the nodes are not available
|
- name: Fail if any of the nodes are not available
|
||||||
fail:
|
fail:
|
||||||
@ -190,9 +190,9 @@
|
|||||||
provision state after provisioning. Ironic provision state:
|
provision state after provisioning. Ironic provision state:
|
||||||
{{ final_provision_state }}. Expected: active.
|
{{ final_provision_state }}. Expected: active.
|
||||||
when:
|
when:
|
||||||
- "{{ wait_active | bool }}"
|
- wait_active | bool
|
||||||
- "{{ initial_provision_state != 'active' }}"
|
- initial_provision_state != 'active'
|
||||||
- "{{ final_provision_state != 'active' }}"
|
- final_provision_state != 'active'
|
||||||
|
|
||||||
- name: Wait for SSH access to the nodes
|
- name: Wait for SSH access to the nodes
|
||||||
local_action:
|
local_action:
|
||||||
@ -201,5 +201,4 @@
|
|||||||
port: 22
|
port: 22
|
||||||
state: started
|
state: started
|
||||||
timeout: "{{ wait_ssh_timeout }}"
|
timeout: "{{ wait_ssh_timeout }}"
|
||||||
when:
|
when: wait_ssh | bool
|
||||||
- "{{ wait_ssh | bool }}"
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
switch_interface_config: >
|
switch_interface_config: >
|
||||||
{{ switch_interface_config | combine(switch_interface_config_discovery) }}
|
{{ switch_interface_config | combine(switch_interface_config_discovery) }}
|
||||||
when: "{{ physical_network_enable_discovery | bool }}"
|
when: physical_network_enable_discovery | bool
|
||||||
|
|
||||||
- name: Restrict switch interfaces to requested subset by name
|
- name: Restrict switch interfaces to requested subset by name
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
||||||
in openstack_auth. Have you sourced the environment file?
|
in openstack_auth. Have you sourced the environment file?
|
||||||
when:
|
when:
|
||||||
- "{{ openstack_auth_type == 'password' }}"
|
- openstack_auth_type == 'password'
|
||||||
- "{{ item not in openstack_auth or not openstack_auth[item] }}"
|
- item not in openstack_auth or not openstack_auth[item]
|
||||||
with_items: "{{ openstack_auth_password_required_params }}"
|
with_items: "{{ openstack_auth_password_required_params }}"
|
||||||
tags:
|
tags:
|
||||||
- config-validation
|
- config-validation
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
module: dellos6_config
|
module: dellos6_config
|
||||||
provider: "{{ dell_switch_provider }}"
|
provider: "{{ dell_switch_provider }}"
|
||||||
src: dellos6-config.j2
|
src: dellos6-config.j2
|
||||||
when: "{{ dell_switch_type == 'dellos6' }}"
|
when: dell_switch_type == 'dellos6'
|
||||||
|
|
||||||
- name: Ensure DellOS9 switches are configured
|
- name: Ensure DellOS9 switches are configured
|
||||||
local_action:
|
local_action:
|
||||||
module: dellos9_config
|
module: dellos9_config
|
||||||
provider: "{{ dell_switch_provider }}"
|
provider: "{{ dell_switch_provider }}"
|
||||||
src: dellos9-config.j2
|
src: dellos9-config.j2
|
||||||
when: "{{ dell_switch_type == 'dellos9' }}"
|
when: dell_switch_type == 'dellos9'
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
- name: Set a fact to determine whether we are running locally
|
- name: Set a fact to determine whether we are running locally
|
||||||
set_fact:
|
set_fact:
|
||||||
is_local: "{{ lookup('pipe', 'hostname') in [ansible_hostname, ansible_nodename] }}"
|
is_local: "{{ lookup('pipe', 'hostname') in [ansible_hostname, ansible_nodename] }}"
|
||||||
when: "{{ selinux_result | changed }}"
|
when: selinux_result | changed
|
||||||
|
|
||||||
# Any SSH connection errors cause ansible to fail the task. We therefore
|
# Any SSH connection errors cause ansible to fail the task. We therefore
|
||||||
# perform a manual SSH connection and allow the command to fail.
|
# perform a manual SSH connection and allow the command to fail.
|
||||||
@ -29,18 +29,18 @@
|
|||||||
sudo shutdown -r now "Applying SELinux changes"
|
sudo shutdown -r now "Applying SELinux changes"
|
||||||
register: reboot_result
|
register: reboot_result
|
||||||
failed_when:
|
failed_when:
|
||||||
- "{{ reboot_result | failed }}"
|
- reboot_result | failed
|
||||||
- "{{ 'closed by remote host' not in reboot_result.stderr }}"
|
- "'closed by remote host' not in reboot_result.stderr"
|
||||||
when:
|
when:
|
||||||
- "{{ selinux_result | changed }}"
|
- selinux_result | changed
|
||||||
- "{{ not is_local | bool }}"
|
- not is_local | bool
|
||||||
|
|
||||||
- name: Reboot the system to apply SELinux changes (local)
|
- name: Reboot the system to apply SELinux changes (local)
|
||||||
command: shutdown -r now "Applying SELinux changes"
|
command: shutdown -r now "Applying SELinux changes"
|
||||||
become: True
|
become: True
|
||||||
when:
|
when:
|
||||||
- "{{ selinux_result | changed }}"
|
- selinux_result | changed
|
||||||
- "{{ is_local | bool }}"
|
- is_local | bool
|
||||||
|
|
||||||
# If we're running this locally we won't get here.
|
# If we're running this locally we won't get here.
|
||||||
- name: Wait for the system to boot up (remote)
|
- name: Wait for the system to boot up (remote)
|
||||||
@ -53,5 +53,5 @@
|
|||||||
delay: 10
|
delay: 10
|
||||||
timeout: "{{ disable_selinux_reboot_timeout }}"
|
timeout: "{{ disable_selinux_reboot_timeout }}"
|
||||||
when:
|
when:
|
||||||
- "{{ selinux_result | changed }}"
|
- selinux_result | changed
|
||||||
- "{{ not is_local | bool }}"
|
- not is_local | bool
|
||||||
|
@ -81,11 +81,11 @@
|
|||||||
Not configuring docker storage in {{ docker_storage_driver }} mode as
|
Not configuring docker storage in {{ docker_storage_driver }} mode as
|
||||||
loopback-backed containers or images exist.
|
loopback-backed containers or images exist.
|
||||||
when:
|
when:
|
||||||
- "{{ 'Data loop file' in docker_info.stdout }}"
|
- "'Data loop file' in docker_info.stdout"
|
||||||
- "{{ 'Images: 0' not in docker_info.stdout }}"
|
- "'Images: 0' not in docker_info.stdout"
|
||||||
- "{{ 'Containers: 0' not in docker_info.stdout }}"
|
- "'Containers: 0' not in docker_info.stdout"
|
||||||
|
|
||||||
- include: storage.yml
|
- include: storage.yml
|
||||||
when: "{{ 'Data loop file' in docker_info.stdout }}"
|
when: "'Data loop file' in docker_info.stdout"
|
||||||
|
|
||||||
- include: config.yml
|
- include: config.yml
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
msg: >
|
msg: >
|
||||||
Unexpected requested boot mode {{ drac_boot_mode }}. Expected one of
|
Unexpected requested boot mode {{ drac_boot_mode }}. Expected one of
|
||||||
{{ drac_boot_mode_valid_modes | join(', ') }}.
|
{{ drac_boot_mode_valid_modes | join(', ') }}.
|
||||||
when: "{{ drac_boot_mode | lower not in drac_boot_mode_valid_modes }}"
|
when: drac_boot_mode | lower not in drac_boot_mode_valid_modes
|
||||||
|
|
||||||
- name: Check the boot mode
|
- name: Check the boot mode
|
||||||
raw: "racadm get BIOS.BiosBootSettings.BootMode"
|
raw: "racadm get BIOS.BiosBootSettings.BootMode"
|
||||||
@ -23,7 +23,7 @@
|
|||||||
msg: >
|
msg: >
|
||||||
Unexpected current boot mode {{ current_boot_mode }}. Expected one of
|
Unexpected current boot mode {{ current_boot_mode }}. Expected one of
|
||||||
{{ drac_boot_mode_valid_modes | join(', ') }}.
|
{{ drac_boot_mode_valid_modes | join(', ') }}.
|
||||||
when: "{{ current_boot_mode not in drac_boot_mode_valid_modes }}"
|
when: current_boot_mode not in drac_boot_mode_valid_modes
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Set the boot mode
|
- name: Set the boot mode
|
||||||
@ -61,4 +61,4 @@
|
|||||||
retries: "{{ drac_boot_mode_timeout // drac_boot_mode_interval }}"
|
retries: "{{ drac_boot_mode_timeout // drac_boot_mode_interval }}"
|
||||||
delay: "{{ drac_boot_mode_interval }}"
|
delay: "{{ drac_boot_mode_interval }}"
|
||||||
|
|
||||||
when: "{{ current_boot_mode != drac_boot_mode }}"
|
when: current_boot_mode != drac_boot_mode
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
Unable to determine the boot mode. Got: {{ result.stdout }}. Expected
|
Unable to determine the boot mode. Got: {{ result.stdout }}. Expected
|
||||||
bios or uefi.
|
bios or uefi.
|
||||||
when:
|
when:
|
||||||
- "{{ not boot_mode_is_bios }}"
|
- not boot_mode_is_bios
|
||||||
- "{{ not boot_mode_is_uefi }}"
|
- not boot_mode_is_uefi
|
||||||
|
|
||||||
- name: Check the BIOS boot sequence
|
- name: Check the BIOS boot sequence
|
||||||
raw: "racadm get BIOS.BiosBootSettings.{% if boot_mode_is_uefi %}Uefi{% endif %}BootSeq"
|
raw: "racadm get BIOS.BiosBootSettings.{% if boot_mode_is_uefi %}Uefi{% endif %}BootSeq"
|
||||||
@ -46,7 +46,7 @@
|
|||||||
msg: >
|
msg: >
|
||||||
There is a pending boot sequence configuration change. Please
|
There is a pending boot sequence configuration change. Please
|
||||||
apply this change before continuing.
|
apply this change before continuing.
|
||||||
when: "{{ 'Pending' in current_boot_sequence }}"
|
when: "'Pending' in current_boot_sequence"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Check the NICs' boot protocol
|
- name: Check the NICs' boot protocol
|
||||||
@ -75,12 +75,12 @@
|
|||||||
There is a pending NIC boot protocol configuration change for
|
There is a pending NIC boot protocol configuration change for
|
||||||
NIC {{ item.nic }}. Please apply this before continuing.
|
NIC {{ item.nic }}. Please apply this before continuing.
|
||||||
with_items: "{{ nic_boot_protos }}"
|
with_items: "{{ nic_boot_protos }}"
|
||||||
when: "{{ 'Pending' in item.current }}"
|
when: "'Pending' in item.current"
|
||||||
|
|
||||||
- name: Ensure NIC boot protocol is configured
|
- name: Ensure NIC boot protocol is configured
|
||||||
raw: "racadm set Nic.NICConfig.{{ item.nic }}.LegacyBootProto {{ item.required }}"
|
raw: "racadm set Nic.NICConfig.{{ item.nic }}.LegacyBootProto {{ item.required }}"
|
||||||
with_items: "{{ nic_boot_protos }}"
|
with_items: "{{ nic_boot_protos }}"
|
||||||
when: "{{ item.current != item.required }}"
|
when: item.current != item.required
|
||||||
register: result
|
register: result
|
||||||
failed_when: "'ERROR' in result.stdout"
|
failed_when: "'ERROR' in result.stdout"
|
||||||
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
||||||
@ -90,7 +90,7 @@
|
|||||||
- name: Ensure NIC configuration jobs are created
|
- name: Ensure NIC configuration jobs are created
|
||||||
raw: "racadm jobqueue create NIC.Integrated.1-{{ item.nic }}-1 -s TIME_NOW"
|
raw: "racadm jobqueue create NIC.Integrated.1-{{ item.nic }}-1 -s TIME_NOW"
|
||||||
with_items: "{{ nic_boot_protos }}"
|
with_items: "{{ nic_boot_protos }}"
|
||||||
when: "{{ item.current != item.required }}"
|
when: item.current != item.required
|
||||||
register: result
|
register: result
|
||||||
failed_when: "'ERROR' in result.stdout"
|
failed_when: "'ERROR' in result.stdout"
|
||||||
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
||||||
@ -101,9 +101,9 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
job_ids: "{{ job_ids + [item.stdout_lines[-1].split()[-1]] }}"
|
job_ids: "{{ job_ids + [item.stdout_lines[-1].split()[-1]] }}"
|
||||||
with_items: "{{ result.results }}"
|
with_items: "{{ result.results }}"
|
||||||
when: "{{ not item.skipped }}"
|
when: not item.skipped
|
||||||
|
|
||||||
when: "{{ boot_mode_is_bios }}"
|
when: boot_mode_is_bios
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Check the UEFI PXE interface
|
- name: Check the UEFI PXE interface
|
||||||
@ -122,7 +122,7 @@
|
|||||||
msg: >
|
msg: >
|
||||||
There is a pending UEFI PXE interface configuration change.
|
There is a pending UEFI PXE interface configuration change.
|
||||||
Please apply this before continuing.
|
Please apply this before continuing.
|
||||||
when: "{{ 'Pending' in current_pxe_interface }}"
|
when: "'Pending' in current_pxe_interface"
|
||||||
|
|
||||||
- name: Ensure UEFI PXE device is configured
|
- name: Ensure UEFI PXE device is configured
|
||||||
raw: "racadm set BIOS.PxeDev1Settings.PxeDev1Interface NIC.Integrated.1-{{ drac_pxe_interface }}-1"
|
raw: "racadm set BIOS.PxeDev1Settings.PxeDev1Interface NIC.Integrated.1-{{ drac_pxe_interface }}-1"
|
||||||
@ -131,14 +131,14 @@
|
|||||||
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
||||||
retries: "{{ drac_pxe_retries }}"
|
retries: "{{ drac_pxe_retries }}"
|
||||||
delay: "{{ drac_pxe_interval }}"
|
delay: "{{ drac_pxe_interval }}"
|
||||||
when: "{{ current_pxe_interface != required_pxe_interface }}"
|
when: current_pxe_interface != required_pxe_interface
|
||||||
|
|
||||||
- name: Set a fact to trigger a BIOS configuration job
|
- name: Set a fact to trigger a BIOS configuration job
|
||||||
set_fact:
|
set_fact:
|
||||||
bios_job_required: True
|
bios_job_required: True
|
||||||
when: "{{ current_pxe_interface != required_pxe_interface }}"
|
when: current_pxe_interface != required_pxe_interface
|
||||||
|
|
||||||
when: "{{ boot_mode_is_uefi }}"
|
when: boot_mode_is_uefi
|
||||||
|
|
||||||
- name: Ensure boot sequence is configured
|
- name: Ensure boot sequence is configured
|
||||||
raw: "racadm set BIOS.BiosBootSettings.BootSeq {{ drac_pxe_bios_boot_sequence }}"
|
raw: "racadm set BIOS.BiosBootSettings.BootSeq {{ drac_pxe_bios_boot_sequence }}"
|
||||||
@ -147,12 +147,12 @@
|
|||||||
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
||||||
retries: "{{ drac_pxe_retries }}"
|
retries: "{{ drac_pxe_retries }}"
|
||||||
delay: "{{ drac_pxe_interval }}"
|
delay: "{{ drac_pxe_interval }}"
|
||||||
when: "{{ current_boot_sequence != required_boot_sequence }}"
|
when: current_boot_sequence != required_boot_sequence
|
||||||
|
|
||||||
- name: Set a fact to trigger a BIOS configuration job
|
- name: Set a fact to trigger a BIOS configuration job
|
||||||
set_fact:
|
set_fact:
|
||||||
bios_job_required: True
|
bios_job_required: True
|
||||||
when: "{{ current_boot_sequence != required_boot_sequence }}"
|
when: current_boot_sequence != required_boot_sequence
|
||||||
|
|
||||||
- name: Ensure BIOS configuration job is created
|
- name: Ensure BIOS configuration job is created
|
||||||
raw: "racadm jobqueue create BIOS.Setup.1-1 -s TIME_NOW"
|
raw: "racadm jobqueue create BIOS.Setup.1-1 -s TIME_NOW"
|
||||||
@ -161,14 +161,14 @@
|
|||||||
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
until: "{{ drac_pxe_busy_message not in result.stdout }}"
|
||||||
retries: "{{ drac_pxe_retries }}"
|
retries: "{{ drac_pxe_retries }}"
|
||||||
delay: "{{ drac_pxe_interval }}"
|
delay: "{{ drac_pxe_interval }}"
|
||||||
when: "{{ bios_job_required }}"
|
when: bios_job_required
|
||||||
|
|
||||||
- name: Set a fact containing the BIOS configuration job ID
|
- name: Set a fact containing the BIOS configuration job ID
|
||||||
set_fact:
|
set_fact:
|
||||||
# Format of the last line is:
|
# Format of the last line is:
|
||||||
# JOB_ID = <job ID>
|
# JOB_ID = <job ID>
|
||||||
job_ids: "{{ job_ids + [result.stdout_lines[-1].split()[-1]] }}"
|
job_ids: "{{ job_ids + [result.stdout_lines[-1].split()[-1]] }}"
|
||||||
when: "{{ bios_job_required }}"
|
when: bios_job_required
|
||||||
|
|
||||||
- name: Ensure server is rebooted
|
- name: Ensure server is rebooted
|
||||||
raw: "racadm serveraction powercycle"
|
raw: "racadm serveraction powercycle"
|
||||||
@ -178,7 +178,7 @@
|
|||||||
- name: Wait for the configuration jobs to complete
|
- name: Wait for the configuration jobs to complete
|
||||||
raw: "racadm jobqueue view -i {{ item }}"
|
raw: "racadm jobqueue view -i {{ item }}"
|
||||||
with_items: "{{ job_ids }}"
|
with_items: "{{ job_ids }}"
|
||||||
when: "{{ job_ids | length > 0 }}"
|
when: job_ids | length > 0
|
||||||
register: result
|
register: result
|
||||||
failed_when: "'ERROR' in result.stdout"
|
failed_when: "'ERROR' in result.stdout"
|
||||||
until: "{{ 'Status=Completed' in result.stdout }}"
|
until: "{{ 'Status=Completed' in result.stdout }}"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
filename: "{{ ipa_images_kernel_name }}"
|
filename: "{{ ipa_images_kernel_name }}"
|
||||||
- url: "{{ ipa_images_ramdisk_url }}"
|
- url: "{{ ipa_images_ramdisk_url }}"
|
||||||
filename: "{{ ipa_images_ramdisk_name }}"
|
filename: "{{ ipa_images_ramdisk_name }}"
|
||||||
when: "{{ item.url != None }}"
|
when: item.url != None
|
||||||
|
|
||||||
- name: Compute the MD5 checksum of the Ironic Python Agent (IPA) images
|
- name: Compute the MD5 checksum of the Ironic Python Agent (IPA) images
|
||||||
stat:
|
stat:
|
||||||
@ -47,7 +47,7 @@
|
|||||||
- name: Set a fact containing the Ironic Python Agent (IPA) kernel image checksum
|
- name: Set a fact containing the Ironic Python Agent (IPA) kernel image checksum
|
||||||
set_fact:
|
set_fact:
|
||||||
ipa_images_kernel_checksum: "{{ openstack_image.checksum }}"
|
ipa_images_kernel_checksum: "{{ openstack_image.checksum }}"
|
||||||
when: "{{ openstack_image != None }}"
|
when: openstack_image != None
|
||||||
|
|
||||||
- name: Gather facts about Ironic Python Agent (IPA) ramdisk image
|
- name: Gather facts about Ironic Python Agent (IPA) ramdisk image
|
||||||
os_image_facts:
|
os_image_facts:
|
||||||
@ -58,7 +58,7 @@
|
|||||||
- name: Set a fact containing the Ironic Python Agent (IPA) ramdisk image checksum
|
- name: Set a fact containing the Ironic Python Agent (IPA) ramdisk image checksum
|
||||||
set_fact:
|
set_fact:
|
||||||
ipa_images_ramdisk_checksum: "{{ openstack_image.checksum }}"
|
ipa_images_ramdisk_checksum: "{{ openstack_image.checksum }}"
|
||||||
when: "{{ openstack_image != None }}"
|
when: openstack_image != None
|
||||||
|
|
||||||
- name: Ensure Ironic Python Agent (IPA) images are removed from Glance
|
- name: Ensure Ironic Python Agent (IPA) images are removed from Glance
|
||||||
os_image:
|
os_image:
|
||||||
@ -74,8 +74,8 @@
|
|||||||
checksum: "{{ ipa_images_checksum.results[1].stat.md5 }}"
|
checksum: "{{ ipa_images_checksum.results[1].stat.md5 }}"
|
||||||
glance_checksum: "{{ ipa_images_ramdisk_checksum | default }}"
|
glance_checksum: "{{ ipa_images_ramdisk_checksum | default }}"
|
||||||
when:
|
when:
|
||||||
- "{{ item.glance_checksum != None }}"
|
- item.glance_checksum != None
|
||||||
- "{{ item.checksum != item.glance_checksum }}"
|
- item.checksum != item.glance_checksum
|
||||||
|
|
||||||
- name: Ensure Ironic Python Agent (IPA) images are registered with Glance
|
- name: Ensure Ironic Python Agent (IPA) images are registered with Glance
|
||||||
os_image:
|
os_image:
|
||||||
|
@ -182,7 +182,7 @@ def main():
|
|||||||
overrides=dict(default={}, type='dict'),
|
overrides=dict(default={}, type='dict'),
|
||||||
sample=dict(default='/usr/share/kolla-ansible/etc_examples/kolla/passwords.yml', type='str'),
|
sample=dict(default='/usr/share/kolla-ansible/etc_examples/kolla/passwords.yml', type='str'),
|
||||||
src=dict(default='/etc/kolla/passwords.yml', type='str'),
|
src=dict(default='/etc/kolla/passwords.yml', type='str'),
|
||||||
vault_password=dict(type='str'),
|
vault_password=dict(type='str', no_log=True),
|
||||||
virtualenv=dict(type='str'),
|
virtualenv=dict(type='str'),
|
||||||
),
|
),
|
||||||
add_file_common_args=True,
|
add_file_common_args=True,
|
||||||
|
@ -23,14 +23,14 @@
|
|||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
become: True
|
become: True
|
||||||
when: "{{ kolla_ansible_ctl_install_type == 'source' }}"
|
when: kolla_ansible_ctl_install_type == 'source'
|
||||||
|
|
||||||
- name: Ensure Kolla Ansible source code checkout exists
|
- name: Ensure Kolla Ansible source code checkout exists
|
||||||
git:
|
git:
|
||||||
repo: "{{ kolla_ansible_source_url }}"
|
repo: "{{ kolla_ansible_source_url }}"
|
||||||
dest: "{{ kolla_ansible_source_path }}"
|
dest: "{{ kolla_ansible_source_path }}"
|
||||||
version: "{{ kolla_ansible_source_version }}"
|
version: "{{ kolla_ansible_source_version }}"
|
||||||
when: "{{ kolla_ansible_ctl_install_type == 'source' }}"
|
when: kolla_ansible_ctl_install_type == 'source'
|
||||||
|
|
||||||
- name: Ensure the latest version of pip is installed
|
- name: Ensure the latest version of pip is installed
|
||||||
pip:
|
pip:
|
||||||
@ -61,7 +61,7 @@
|
|||||||
# Required for kolla-genpwd.
|
# Required for kolla-genpwd.
|
||||||
- name: PyYAML
|
- name: PyYAML
|
||||||
version: "3.12"
|
version: "3.12"
|
||||||
when: "{{ item.install | default(True) | bool }}"
|
when: item.install | default(True) | bool
|
||||||
|
|
||||||
# This is a workaround for the lack of a python package for libselinux-python
|
# This is a workaround for the lack of a python package for libselinux-python
|
||||||
# on PyPI. Without using --system-site-packages to create the virtualenv, it
|
# on PyPI. Without using --system-site-packages to create the virtualenv, it
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- include: install.yml
|
- include: install.yml
|
||||||
when: "{{ kolla_ansible_is_standalone | bool }}"
|
when: kolla_ansible_is_standalone | bool
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
|
|
||||||
|
@ -25,14 +25,14 @@
|
|||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
become: True
|
become: True
|
||||||
when: "{{ kolla_ctl_install_type == 'source' }}"
|
when: kolla_ctl_install_type == 'source'
|
||||||
|
|
||||||
- name: Ensure Kolla source code checkout exists
|
- name: Ensure Kolla source code checkout exists
|
||||||
git:
|
git:
|
||||||
repo: "{{ kolla_source_url }}"
|
repo: "{{ kolla_source_url }}"
|
||||||
dest: "{{ kolla_source_path }}"
|
dest: "{{ kolla_source_path }}"
|
||||||
version: "{{ kolla_source_version }}"
|
version: "{{ kolla_source_version }}"
|
||||||
when: "{{ kolla_ctl_install_type == 'source' }}"
|
when: kolla_ctl_install_type == 'source'
|
||||||
|
|
||||||
- name: Ensure the latest version of pip is installed
|
- name: Ensure the latest version of pip is installed
|
||||||
pip:
|
pip:
|
||||||
@ -64,4 +64,4 @@
|
|||||||
# Required for kolla-genpwd.
|
# Required for kolla-genpwd.
|
||||||
- name: PyYAML
|
- name: PyYAML
|
||||||
version: "3.12"
|
version: "3.12"
|
||||||
when: "{{ item.install | default(True) | bool }}"
|
when: item.install | default(True) | bool
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
with_items: "{{ libvirt_vm_volumes }}"
|
with_items: "{{ libvirt_vm_volumes }}"
|
||||||
register: volume_result
|
register: volume_result
|
||||||
changed_when:
|
changed_when:
|
||||||
- "{{ volume_result | success }}"
|
- volume_result | success
|
||||||
- "{{ (volume_result.stdout | from_json).changed | default(True) }}"
|
- (volume_result.stdout | from_json).changed | default(True)
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
url: "{{ item }}"
|
url: "{{ item }}"
|
||||||
dest: "{{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
|
dest: "{{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
|
||||||
with_items: "{{ libvirt_vm_volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
|
with_items: "{{ libvirt_vm_volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
|
||||||
when: "{{ 'http' in item }}"
|
when: "'http' in item"
|
||||||
|
|
||||||
- name: Ensure local images are copied
|
- name: Ensure local images are copied
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "{{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
|
dest: "{{ libvirt_vm_image_cache_path }}/{{ item | basename }}"
|
||||||
with_items: "{{ libvirt_vm_volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
|
with_items: "{{ libvirt_vm_volumes | selectattr('image', 'defined') | map(attribute='image') | list }}"
|
||||||
when: "{{ 'http' not in item }}"
|
when: "'http' not in item"
|
||||||
|
|
||||||
- name: Ensure the VM volumes exist
|
- name: Ensure the VM volumes exist
|
||||||
script: >
|
script: >
|
||||||
@ -26,5 +26,5 @@
|
|||||||
with_items: "{{ libvirt_vm_volumes }}"
|
with_items: "{{ libvirt_vm_volumes }}"
|
||||||
register: volume_result
|
register: volume_result
|
||||||
changed_when:
|
changed_when:
|
||||||
- "{{ volume_result | success }}"
|
- volume_result | success
|
||||||
- "{{ (volume_result.stdout | from_json).changed | default(True) }}"
|
- (volume_result.stdout | from_json).changed | default(True)
|
||||||
|
@ -39,5 +39,5 @@
|
|||||||
with_together:
|
with_together:
|
||||||
- "{{ veth_result.results }}"
|
- "{{ veth_result.results }}"
|
||||||
- "{{ peer_result.results }}"
|
- "{{ peer_result.results }}"
|
||||||
when: "{{ ctl_result|changed or item[0]|changed or item[1]|changed }}"
|
when: ctl_result|changed or item[0]|changed or item[1]|changed
|
||||||
become: True
|
become: True
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
notify:
|
notify:
|
||||||
- Copy Ironic Python Agent images into /httpboot
|
- Copy Ironic Python Agent images into /httpboot
|
||||||
become: True
|
become: True
|
||||||
when: "{{ ipa_build_images | bool }}"
|
when: ipa_build_images | bool
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: Copy Ironic Python Agent images into /httpboot
|
- name: Copy Ironic Python Agent images into /httpboot
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
msg: >
|
msg: >
|
||||||
There should be exactly one host in the seed group. There are
|
There should be exactly one host in the seed group. There are
|
||||||
currently {{ groups['seed'] | length }}.
|
currently {{ groups['seed'] | length }}.
|
||||||
when: "{{ groups['seed'] | length != 1 }}"
|
when: groups['seed'] | length != 1
|
||||||
|
|
||||||
- name: Ensure the image cache directory exists
|
- name: Ensure the image cache directory exists
|
||||||
file:
|
file:
|
||||||
|
@ -8,4 +8,4 @@
|
|||||||
swift_region: 1
|
swift_region: 1
|
||||||
# ID of the zone for this Swift service.
|
# ID of the zone for this Swift service.
|
||||||
swift_zone: "{{ groups['controllers'].index(inventory_hostname) % swift_num_zones }}"
|
swift_zone: "{{ groups['controllers'].index(inventory_hostname) % swift_num_zones }}"
|
||||||
when: "{{ kolla_enable_swift | bool }}"
|
when: kolla_enable_swift | bool
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
{% if item in openstack_auth %}empty{% else %}not present{% endif %}
|
||||||
in openstack_auth. Have you sourced the environment file?
|
in openstack_auth. Have you sourced the environment file?
|
||||||
when:
|
when:
|
||||||
- "{{ openstack_auth_type == 'password' }}"
|
- openstack_auth_type == 'password'
|
||||||
- "{{ item not in openstack_auth or not openstack_auth[item] }}"
|
- item not in openstack_auth or not openstack_auth[item]
|
||||||
with_items: "{{ openstack_auth_password_required_params }}"
|
with_items: "{{ openstack_auth_password_required_params }}"
|
||||||
tags:
|
tags:
|
||||||
- config-validation
|
- config-validation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user