aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamYaple <sam@yaple.net>2016-01-05 18:14:11 +0000
committerSamYaple <sam@yaple.net>2016-01-06 04:23:28 +0000
commit575bc72f7bdd1fce8ee2ddb51956faea1e9f2ad2 (patch)
tree2e3295b457dbee8449869bfbe184189ab55db0be
parent79f4883cc8a7c1696ae7a4df2d334c0e97ab4cac (diff)
downloadkolla-575bc72f7bdd1fce8ee2ddb51956faea1e9f2ad2.tar.gz
kolla-575bc72f7bdd1fce8ee2ddb51956faea1e9f2ad2.zip
Allow nova role to pull images
Change-Id: Ic20c31efea461f30917a94546db6e261a8b5166f Partially-Implements: blueprint pre-pull-images
-rw-r--r--ansible/roles/nova/tasks/deploy.yml38
-rw-r--r--ansible/roles/nova/tasks/main.yml38
-rw-r--r--ansible/roles/nova/tasks/pull.yml72
3 files changed, 111 insertions, 37 deletions
diff --git a/ansible/roles/nova/tasks/deploy.yml b/ansible/roles/nova/tasks/deploy.yml
new file mode 100644
index 000000000..f72e6e219
--- /dev/null
+++ b/ansible/roles/nova/tasks/deploy.yml
@@ -0,0 +1,38 @@
+---
+- include: ceph.yml
+ when:
+ - enable_ceph | bool
+ - inventory_hostname in groups['ceph-mon'] or
+ inventory_hostname in groups['compute'] or
+ inventory_hostname in groups['nova-api'] or
+ inventory_hostname in groups['nova-conductor'] or
+ inventory_hostname in groups['nova-consoleauth'] or
+ inventory_hostname in groups['nova-novncproxy'] or
+ inventory_hostname in groups['nova-scheduler']
+
+- include: register.yml
+ when: inventory_hostname in groups['nova-api']
+
+- include: config.yml
+ when: inventory_hostname in groups['compute'] or
+ inventory_hostname in groups['nova-api'] or
+ inventory_hostname in groups['nova-conductor'] or
+ inventory_hostname in groups['nova-consoleauth'] or
+ inventory_hostname in groups['nova-novncproxy'] or
+ inventory_hostname in groups['nova-scheduler']
+
+- include: config-nova-fake.yml
+ when:
+ - enable_nova_fake | bool
+ - inventory_hostname in groups['compute']
+
+- include: bootstrap.yml
+ when: inventory_hostname in groups['nova-api']
+
+- include: start.yml
+ when: inventory_hostname in groups['compute'] or
+ inventory_hostname in groups['nova-api'] or
+ inventory_hostname in groups['nova-conductor'] or
+ inventory_hostname in groups['nova-consoleauth'] or
+ inventory_hostname in groups['nova-novncproxy'] or
+ inventory_hostname in groups['nova-scheduler']
diff --git a/ansible/roles/nova/tasks/main.yml b/ansible/roles/nova/tasks/main.yml
index f72e6e219..b017e8b4a 100644
--- a/ansible/roles/nova/tasks/main.yml
+++ b/ansible/roles/nova/tasks/main.yml
@@ -1,38 +1,2 @@
---
-- include: ceph.yml
- when:
- - enable_ceph | bool
- - inventory_hostname in groups['ceph-mon'] or
- inventory_hostname in groups['compute'] or
- inventory_hostname in groups['nova-api'] or
- inventory_hostname in groups['nova-conductor'] or
- inventory_hostname in groups['nova-consoleauth'] or
- inventory_hostname in groups['nova-novncproxy'] or
- inventory_hostname in groups['nova-scheduler']
-
-- include: register.yml
- when: inventory_hostname in groups['nova-api']
-
-- include: config.yml
- when: inventory_hostname in groups['compute'] or
- inventory_hostname in groups['nova-api'] or
- inventory_hostname in groups['nova-conductor'] or
- inventory_hostname in groups['nova-consoleauth'] or
- inventory_hostname in groups['nova-novncproxy'] or
- inventory_hostname in groups['nova-scheduler']
-
-- include: config-nova-fake.yml
- when:
- - enable_nova_fake | bool
- - inventory_hostname in groups['compute']
-
-- include: bootstrap.yml
- when: inventory_hostname in groups['nova-api']
-
-- include: start.yml
- when: inventory_hostname in groups['compute'] or
- inventory_hostname in groups['nova-api'] or
- inventory_hostname in groups['nova-conductor'] or
- inventory_hostname in groups['nova-consoleauth'] or
- inventory_hostname in groups['nova-novncproxy'] or
- inventory_hostname in groups['nova-scheduler']
+- include: "{{ action }}.yml"
diff --git a/ansible/roles/nova/tasks/pull.yml b/ansible/roles/nova/tasks/pull.yml
new file mode 100644
index 000000000..a8d0a9f52
--- /dev/null
+++ b/ansible/roles/nova/tasks/pull.yml
@@ -0,0 +1,72 @@
+---
+- name: Pulling nova-api image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_api_image_full }}"
+ when: inventory_hostname in groups['nova-api']
+
+- name: Pulling nova-compute image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_compute_image_full }}"
+ when:
+ - inventory_hostname in groups['compute']
+ - not enable_nova_fake | bool
+
+- name: Pulling nova-compute-ironic image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_compute_ironic_image_full }}"
+ when:
+ - inventory_hostname in groups['nova-compute-ironic']
+ - enable_ironic | bool
+
+- name: Pulling nova-conductor image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_conductor_image_full }}"
+ when: inventory_hostname in groups['nova-conductor']
+
+- name: Pulling nova-consoleauth image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_consoleauth_image_full }}"
+ when: inventory_hostname in groups['nova-consoleauth']
+
+- name: Pulling nova-libvirt image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_libvirt_image_full }}"
+ when: inventory_hostname in groups['compute']
+
+- name: Pulling nova-novncproxy image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_novncproxy_image_full }}"
+ when:
+ - inventory_hostname in groups['nova-novncproxy']
+ - nova_console == 'novnc'
+
+- name: Pulling nova-scheduler image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_scheduler_image_full }}"
+ when: inventory_hostname in groups['nova-scheduler']
+
+- name: Pulling nova-spicehtml5proxy image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ nova_spicehtml5proxy_image_full }}"
+ when:
+ - inventory_hostname in groups['nova-spicehtml5proxy']
+ - nova_console == 'spice'
+