bifrost/playbooks/example-deploy-all-available-nodes.yaml
Julia Kreger 8bee4eddc9 Add additional note dependent upon os_ironic_facts
Adding additional note to example deployment playbook that is
dependent upon os_ironic_facts expressing that a user could leverage
the module combined with something similar to the facts to permit a
user to utilize original data sources.

Change-Id: I3b23e4176798dc8cc3f6f7f1a01c5c7fbd3c4161
Depends-On: Ief657e06e781133dd53a58c1da11802d8d7d03c4
2015-06-26 00:57:51 +00:00

31 lines
1.2 KiB
YAML

# This is an example playbook utilizing role conditionals to permit
# deployment on available nodes.
#
# To utilize:
# export BIFROST_INVENTORY_SOURCE=ironic
# ansible-playbook -vvvv -i inventory/bifrost_inventory.py example-deploy-all-available-nodes.yaml
#
# NOTE(TheJulia): The format of this example will cause hosts to be deployed
# utilizing DHCP on eth0 of Ubuntu/Debian hosts. It is advisable you build
# your deployment image with the dhcp-all-interfaces element when deploying
# other operating systems or if your target node has multiple ethernet
# interfaces.
#
# NOTE(TheJulia): A user could utilize the os_ironic_facts module with another
# data source such as a CSV, YAML, or JSON file formats to query ironic, and
# the example role conditionals below to query current status and deploy to
# nodes.
---
- hosts: localhost
connection: local
name: "Collect facts"
sudo: no
gather_facts: yes
- hosts: baremetal
name: "Create configuration drive files and deploy machines from inventory"
sudo: no
connection: local
roles:
- { role: bifrost-configdrives-dynamic, when: provision_state == "available" and maintenance | bool != true }
- { role: bifrost-deploy-nodes-dynamic, when: provision_state == "available" and maintenance | bool != true }