922eb494e6
Ironic inspector should honour the Ansible inventory group ironic-inspector. Ironic inspector may not be required at all. If Ironic inspector is required then it should only run on a single node, and this should be reflected by the inventory. This change makes a number of Ironic inspector-related tasks dependent upon the host's membership of the ironic-inspector group. Also, we couple the ironic-dnsmasq container with the ironic-inspector group rather than ironic-conductor, as the service is for inspector rather than Ironic. Change-Id: Ifd90753b0fe1a55c11b7723c28e1d14ab3d32737 Closes-Bug: #1665257
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
---
|
|
- name: Running Ironic bootstrap container
|
|
kolla_docker:
|
|
action: "start_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
detach: False
|
|
environment:
|
|
KOLLA_BOOTSTRAP:
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
image: "{{ ironic_api_image_full }}"
|
|
labels:
|
|
BOOTSTRAP:
|
|
name: "bootstrap_ironic"
|
|
restart_policy: "never"
|
|
volumes:
|
|
- "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
run_once: True
|
|
delegate_to: "{{ groups['ironic-api'][0] }}"
|
|
when: inventory_hostname in groups['ironic-api']
|
|
|
|
- name: Running Ironic Inspector bootstrap container
|
|
kolla_docker:
|
|
action: "start_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
detach: False
|
|
environment:
|
|
KOLLA_BOOTSTRAP:
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
image: "{{ ironic_inspector_image_full }}"
|
|
labels:
|
|
BOOTSTRAP:
|
|
name: "bootstrap_ironic_inspector"
|
|
restart_policy: "never"
|
|
volumes:
|
|
- "{{ node_config_directory }}/ironic-inspector/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
run_once: True
|
|
delegate_to: "{{ groups['ironic-inspector'][0] }}"
|
|
when: inventory_hostname in groups['ironic-inspector']
|