diff --git a/ansible/roles/magnum/tasks/deploy.yml b/ansible/roles/magnum/tasks/deploy.yml new file mode 100644 index 0000000000..50e56814ac --- /dev/null +++ b/ansible/roles/magnum/tasks/deploy.yml @@ -0,0 +1,14 @@ +--- +- include: register.yml + when: inventory_hostname in groups['magnum-api'] + +- include: config.yml + when: inventory_hostname in groups['magnum-api'] or + inventory_hostname in groups['magnum-conductor'] + +- include: bootstrap.yml + when: inventory_hostname in groups['magnum-api'] + +- include: start.yml + when: inventory_hostname in groups['magnum-api'] or + inventory_hostname in groups['magnum-conductor'] diff --git a/ansible/roles/magnum/tasks/main.yml b/ansible/roles/magnum/tasks/main.yml index 50e56814ac..b017e8b4ad 100644 --- a/ansible/roles/magnum/tasks/main.yml +++ b/ansible/roles/magnum/tasks/main.yml @@ -1,14 +1,2 @@ --- -- include: register.yml - when: inventory_hostname in groups['magnum-api'] - -- include: config.yml - when: inventory_hostname in groups['magnum-api'] or - inventory_hostname in groups['magnum-conductor'] - -- include: bootstrap.yml - when: inventory_hostname in groups['magnum-api'] - -- include: start.yml - when: inventory_hostname in groups['magnum-api'] or - inventory_hostname in groups['magnum-conductor'] +- include: "{{ action }}.yml" diff --git a/ansible/roles/magnum/tasks/pull.yml b/ansible/roles/magnum/tasks/pull.yml new file mode 100644 index 0000000000..3825c7520a --- /dev/null +++ b/ansible/roles/magnum/tasks/pull.yml @@ -0,0 +1,14 @@ +--- +- name: Pulling magnum-api image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ magnum_api_image_full }}" + when: inventory_hostname in groups['magnum-api'] + +- name: Pulling magnum-conductor image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ magnum_conductor_image_full }}" + when: inventory_hostname in groups['magnum-conductor']