tenks/ansible/node_enrolment.yml
Mark Goddard 6e2bb04fae Add playbook tags
Allows for easily running specific playbooks.

Change-Id: Ia859238042eb286b61758acd8f99361c10dc0a05
2019-03-27 16:43:13 +00:00

27 lines
854 B
YAML

---
- hosts: localhost
tags:
- node-enrolment
- node-enrollment
tasks:
- name: Load state from file
include_vars:
file: "{{ state_file_path }}"
name: tenks_state
- name: Perform Ironic enrolment for each hypervisor's nodes
include_role:
name: ironic-enrolment
vars:
ironic_deploy_kernel: "{{ deploy_kernel }}"
ironic_deploy_ramdisk: "{{ deploy_ramdisk }}"
ironic_nodes: "{{ alloc.value.nodes }}"
ironic_hypervisor: "{{ alloc.key }}"
ironic_virtualenv_path: "{{ virtualenv_path }}"
ironic_python_upper_constraints_url: >-
{{ python_upper_constraints_url }}
loop: "{{ query('dict', tenks_state) }}"
loop_control:
loop_var: alloc
when: ironic_nodes | selectattr('ironic_config', 'defined') | list | length > 0