diff --git a/ansible/roles/ironic/tasks/deploy.yml b/ansible/roles/ironic/tasks/deploy.yml new file mode 100644 index 0000000000..e32778aee8 --- /dev/null +++ b/ansible/roles/ironic/tasks/deploy.yml @@ -0,0 +1,18 @@ +--- +- include: register.yml + when: inventory_hostname in groups['ironic-api'] + +- include: config.yml + when: inventory_hostname in groups['ironic-api'] or + inventory_hostname in groups['ironic-conductor'] or + inventory_hostname in groups['ironic-discoverd'] or + inventory_hostname in groups['ironic-pxe'] + +- include: bootstrap.yml + when: inventory_hostname in groups['ironic-api'] + +- include: start.yml + when: inventory_hostname in groups['ironic-api'] or + inventory_hostname in groups['ironic-conductor'] or + inventory_hostname in groups['ironic-discoverd'] or + inventory_hostname in groups['ironic-pxe'] diff --git a/ansible/roles/ironic/tasks/main.yml b/ansible/roles/ironic/tasks/main.yml index e32778aee8..b017e8b4ad 100644 --- a/ansible/roles/ironic/tasks/main.yml +++ b/ansible/roles/ironic/tasks/main.yml @@ -1,18 +1,2 @@ --- -- include: register.yml - when: inventory_hostname in groups['ironic-api'] - -- include: config.yml - when: inventory_hostname in groups['ironic-api'] or - inventory_hostname in groups['ironic-conductor'] or - inventory_hostname in groups['ironic-discoverd'] or - inventory_hostname in groups['ironic-pxe'] - -- include: bootstrap.yml - when: inventory_hostname in groups['ironic-api'] - -- include: start.yml - when: inventory_hostname in groups['ironic-api'] or - inventory_hostname in groups['ironic-conductor'] or - inventory_hostname in groups['ironic-discoverd'] or - inventory_hostname in groups['ironic-pxe'] +- include: "{{ action }}.yml" diff --git a/ansible/roles/ironic/tasks/pull.yml b/ansible/roles/ironic/tasks/pull.yml new file mode 100644 index 0000000000..9ee19f9774 --- /dev/null +++ b/ansible/roles/ironic/tasks/pull.yml @@ -0,0 +1,28 @@ +--- +- name: Pulling ironic-api image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ironic_api_image_full }}" + when: inventory_hostname in groups['ironic-api'] + +- name: Pulling ironic-conductor image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ironic_conductor_image_full }}" + when: inventory_hostname in groups['ironic-conductor'] + +- name: Pulling ironic-discoverd image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ironic_discoverd_image_full }}" + when: inventory_hostname in groups['ironic-discoverd'] + +- name: Pulling ironic-pxe image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ ironic_pxe_image_full }}" + when: inventory_hostname in groups['ironic-pxe']