2016-01-05 17:57:55 +00:00
|
|
|
---
|
2018-07-23 04:58:02 +00:00
|
|
|
- include_tasks: register.yml
|
2017-06-23 14:21:51 +00:00
|
|
|
when: enable_keystone | bool and
|
|
|
|
(inventory_hostname in groups['ironic-api'] or
|
|
|
|
inventory_hostname in groups['ironic-inspector'])
|
2016-01-05 17:57:55 +00:00
|
|
|
|
2018-07-23 04:58:02 +00:00
|
|
|
- include_tasks: config.yml
|
2016-01-05 17:57:55 +00:00
|
|
|
when: inventory_hostname in groups['ironic-api'] or
|
|
|
|
inventory_hostname in groups['ironic-conductor'] or
|
2016-02-16 12:31:39 +00:00
|
|
|
inventory_hostname in groups['ironic-inspector'] or
|
2018-04-18 16:46:38 +00:00
|
|
|
inventory_hostname in groups['ironic-pxe'] or
|
|
|
|
inventory_hostname in groups['ironic-ipxe']
|
2016-01-05 17:57:55 +00:00
|
|
|
|
2018-07-23 04:58:02 +00:00
|
|
|
- include_tasks: clone.yml
|
2018-05-28 15:03:18 +00:00
|
|
|
when: ironic_dev_mode | bool
|
|
|
|
|
2018-07-23 04:58:02 +00:00
|
|
|
- include_tasks: bootstrap.yml
|
2017-01-13 18:19:20 +00:00
|
|
|
when: inventory_hostname in groups['ironic-api'] or
|
2016-02-16 12:31:39 +00:00
|
|
|
inventory_hostname in groups['ironic-inspector'] or
|
2016-01-05 17:57:55 +00:00
|
|
|
inventory_hostname in groups['ironic-pxe']
|
2017-01-23 04:14:50 +00:00
|
|
|
|
|
|
|
- name: Flush handlers
|
|
|
|
meta: flush_handlers
|
2019-04-03 16:33:04 +00:00
|
|
|
|
|
|
|
# NOTE(mgoddard): If inspector was previously configured to use the iptables
|
|
|
|
# PXE filter, it may leave rules in place that block inspection. Clean them up.
|
|
|
|
# The iptables Ansible module is not idempotent - it fails if the chain does
|
|
|
|
# not exist, so use a command instead.
|
|
|
|
- name: Flush and delete ironic-inspector iptables chain
|
|
|
|
become: true
|
|
|
|
command: iptables --{{ item }} ironic-inspector
|
|
|
|
register: ironic_inspector_chain
|
|
|
|
with_items:
|
|
|
|
- flush
|
|
|
|
- delete-chain
|
|
|
|
when: ironic_inspector_pxe_filter != 'iptables'
|
|
|
|
changed_when: ironic_inspector_chain.rc == 0
|
|
|
|
failed_when:
|
|
|
|
- ironic_inspector_chain.rc != 0
|
|
|
|
- "'No chain/target/match by that name' not in ironic_inspector_chain.stderr"
|