From 06356a8b0f5a44a8b2f0ae2b89c813832e37b3dc Mon Sep 17 00:00:00 2001 From: SamYaple Date: Tue, 5 Jan 2016 18:03:00 +0000 Subject: [PATCH] Allow magnum role to pull images Change-Id: Ia7a0bb934827f37af6091895b95ece95a9e3c874 Partially-Implements: blueprint pre-pull-images --- ansible/roles/magnum/tasks/deploy.yml | 14 ++++++++++++++ ansible/roles/magnum/tasks/main.yml | 14 +------------- ansible/roles/magnum/tasks/pull.yml | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 ansible/roles/magnum/tasks/deploy.yml create mode 100644 ansible/roles/magnum/tasks/pull.yml 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']