2e190597bb
In change I78cb60168aaa40bb6439198283546b7faf33917c, action was changed to kolla_action, and serial to kolla_serial, to avoid Ansible warnings due to use of reserved keywords. In that change, some keywords were missed, and some changes that were merged since then have not switched to the new variables. This change fixes all current instances of those issues. Change-Id: I357dffdfcb2b405e280a962d366ee65eebf0a8d1 Implements: blueprint migrate-to-ansible-2-2-0
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
---
|
|
# NOTE(awiddersheim): Gather facts for all hosts as a
|
|
# first step since several plays below require them when
|
|
# building their configurations. The below 'gather_facts'
|
|
# set to 'false' is a bit confusing but this is to avoid
|
|
# Ansible gathering facts twice.
|
|
- name: Gather facts for all hosts
|
|
hosts: all
|
|
serial: '{{ kolla_serial|default("0") }}'
|
|
gather_facts: false
|
|
tasks:
|
|
- setup:
|
|
tags: always
|
|
|
|
# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The
|
|
# limit arg will cause the first play to gather facts only about that node,
|
|
# meaning facts such as IP addresses for rabbitmq nodes etc. will be undefined
|
|
# in the case of adding a single compute node.
|
|
# We don't want to add the delegate parameters to the above play as it will
|
|
# result in ((num_nodes-1)^2) number of SSHs when running for all nodes
|
|
# which can be very inefficient.
|
|
- name: Gather facts for all hosts (if using --limit)
|
|
hosts: all
|
|
serial: '{{ kolla_serial|default("0") }}'
|
|
gather_facts: false
|
|
tasks:
|
|
- setup:
|
|
delegate_facts: True
|
|
delegate_to: "{{ item }}"
|
|
with_items: "{{ groups['all'] }}"
|
|
when:
|
|
- (ansible_play_batch | length) != (groups['all'] | length)
|
|
|
|
- name: Apply role baremetal
|
|
hosts: baremetal
|
|
gather_facts: no
|
|
roles:
|
|
- { role: baremetal,
|
|
tags: baremetal }
|