aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamYaple <sam@yaple.net>2016-01-05 18:03:00 +0000
committerSamYaple <sam@yaple.net>2016-01-06 04:23:28 +0000
commit06356a8b0f5a44a8b2f0ae2b89c813832e37b3dc (patch)
tree3cf19536c930f66a1ce15534907382295fc36051
parent9efc593c8f7124589a5e562139075447a4c84f24 (diff)
downloadkolla-06356a8b0f5a44a8b2f0ae2b89c813832e37b3dc.tar.gz
kolla-06356a8b0f5a44a8b2f0ae2b89c813832e37b3dc.zip
Allow magnum role to pull images
Change-Id: Ia7a0bb934827f37af6091895b95ece95a9e3c874 Partially-Implements: blueprint pre-pull-images
-rw-r--r--ansible/roles/magnum/tasks/deploy.yml14
-rw-r--r--ansible/roles/magnum/tasks/main.yml14
-rw-r--r--ansible/roles/magnum/tasks/pull.yml14
3 files changed, 29 insertions, 13 deletions
diff --git a/ansible/roles/magnum/tasks/deploy.yml b/ansible/roles/magnum/tasks/deploy.yml
new file mode 100644
index 000000000..50e56814a
--- /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 50e56814a..b017e8b4a 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 000000000..3825c7520
--- /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']