aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-06 08:24:32 +0000
committerGerrit Code Review <review@openstack.org>2016-01-06 08:24:32 +0000
commit367c67dd2587f0868dde61a74826ae6c805a7bb7 (patch)
tree8e94361c6469319ac305b59bd545e78068e93186
parentd9762fe61ed6afc212fd8dbf586810b9be8713ab (diff)
parent79f4883cc8a7c1696ae7a4df2d334c0e97ab4cac (diff)
downloadkolla-367c67dd2587f0868dde61a74826ae6c805a7bb7.tar.gz
kolla-367c67dd2587f0868dde61a74826ae6c805a7bb7.zip
Merge "Allow neutron role to pull images"
-rw-r--r--ansible/roles/neutron/tasks/deploy.yml24
-rw-r--r--ansible/roles/neutron/tasks/main.yml24
-rw-r--r--ansible/roles/neutron/tasks/pull.yml50
3 files changed, 75 insertions, 23 deletions
diff --git a/ansible/roles/neutron/tasks/deploy.yml b/ansible/roles/neutron/tasks/deploy.yml
new file mode 100644
index 000000000..19bf5d384
--- /dev/null
+++ b/ansible/roles/neutron/tasks/deploy.yml
@@ -0,0 +1,24 @@
+---
+# enforce ironic usage only with openvswtich
+- include: ironic-check.yml
+
+- include: register.yml
+ when: inventory_hostname in groups['neutron-server']
+
+- include: config.yml
+ when: inventory_hostname in groups['compute'] or
+ inventory_hostname in groups['neutron-agents'] or
+ inventory_hostname in groups['neutron-server']
+
+- include: config-neutron-fake.yml
+ when:
+ - inventory_hostname in groups['compute']
+ - enable_nova_fake | bool
+
+- include: bootstrap.yml
+ when: inventory_hostname in groups['neutron-server']
+
+- include: start.yml
+ when: inventory_hostname in groups['compute'] or
+ inventory_hostname in groups['neutron-agents'] or
+ inventory_hostname in groups['neutron-server']
diff --git a/ansible/roles/neutron/tasks/main.yml b/ansible/roles/neutron/tasks/main.yml
index 19bf5d384..b017e8b4a 100644
--- a/ansible/roles/neutron/tasks/main.yml
+++ b/ansible/roles/neutron/tasks/main.yml
@@ -1,24 +1,2 @@
---
-# enforce ironic usage only with openvswtich
-- include: ironic-check.yml
-
-- include: register.yml
- when: inventory_hostname in groups['neutron-server']
-
-- include: config.yml
- when: inventory_hostname in groups['compute'] or
- inventory_hostname in groups['neutron-agents'] or
- inventory_hostname in groups['neutron-server']
-
-- include: config-neutron-fake.yml
- when:
- - inventory_hostname in groups['compute']
- - enable_nova_fake | bool
-
-- include: bootstrap.yml
- when: inventory_hostname in groups['neutron-server']
-
-- include: start.yml
- when: inventory_hostname in groups['compute'] or
- inventory_hostname in groups['neutron-agents'] or
- inventory_hostname in groups['neutron-server']
+- include: "{{ action }}.yml"
diff --git a/ansible/roles/neutron/tasks/pull.yml b/ansible/roles/neutron/tasks/pull.yml
new file mode 100644
index 000000000..01c77d278
--- /dev/null
+++ b/ansible/roles/neutron/tasks/pull.yml
@@ -0,0 +1,50 @@
+---
+- name: Pulling neutron-agents image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_agents_image_full }}"
+ when: inventory_hostname in groups['neutron-agents']
+
+- name: Pulling neutron-linuxbridge-agent image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_linuxbridge_agent_image_full }}"
+ when:
+ - (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
+ - neutron_plugin_agent == "linuxbridge"
+
+- name: Pulling neutron-openvswitch-agent image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_openvswitch_agent_image_full }}"
+ when:
+ - (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
+ - neutron_plugin_agent == "openvswitch"
+
+- name: Pulling neutron-server image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_server_image_full }}"
+ when: inventory_hostname in groups['neutron-server']
+
+- name: Pulling openvswitch-db image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ openvswitch_db_image_full }}"
+ when:
+ - (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
+ - neutron_plugin_agent == "openvswitch"
+
+- name: Pulling openvswitch-vswitchd image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ openvswitch_vswitchd_image_full }}"
+ when:
+ - (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
+ - neutron_plugin_agent == "openvswitch"