---
# Copyright 2016 IBM Corp.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Gather facts from localhost
  hosts: localhost
  gather_facts: yes
  tasks:
    - name: Include localhost variables
      include_vars: host_vars/localhost

- name: Configure interfaces
  hosts: all
  tasks:
    - include: tasks/create_interfaces.yml
  handlers:
    - include: handlers/reboot.yml

- name: Transfer keys
  hosts: controllers:compute
  tasks:
    - include: tasks/transfer_keys.yml

- name: Transfer inventory file
  hosts: controllers
  tasks:
    - include: tasks/transfer_inventory.yml

- name: Cluster Software Bootstrap
  hosts: all
  tasks:
    - include: tasks/cmd_bootstrap.yml
      when: hostvars['localhost']['software_bootstrap_hosts'] is defined

---
# Copyright 2016 IBM Corp.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Gather facts from localhost
  hosts: localhost
  gather_facts: yes
  tasks:
    - name: Include localhost variables
      include_vars: host_vars/localhost

- name: Configure interfaces
  hosts: all
  tasks:
    - include: tasks/create_interfaces.yml
  handlers:
    - include: handlers/reboot.yml

- name: Transfer keys
  hosts: controllers:compute
  tasks:
    - include: tasks/transfer_keys.yml

- name: Transfer inventory file
  hosts: controllers
  tasks:
    - include: tasks/transfer_inventory.yml

- name: Cluster Software Bootstrap
  hosts: all
  tasks:
    - include: tasks/cmd_bootstrap.yml
      when: software_bootstrap is defined

Use inventory vars for bootstrap conditional
fix: Use inventory vars for bootstrap conditional

Use 'software_bootstrap' from dynamic inventory 'vars' instead of
'hostvars['localhost']['software_bootstrap_hosts']'.

Change-Id: I603f46e35780f85ad04e9d3a52bc3eb3f1958d20
