From b13c18ae9ca269f8edb035a920a530105b72a16f Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 21 Mar 2016 01:11:13 +0800 Subject: [PATCH] Install neutron in manila-share group only when enable_manila is true TrivialFix Change-Id: Idfc5d03d3359003cdb82b85b71b87ccefd4a0a43 --- ansible/roles/neutron/tasks/deploy.yml | 4 ++-- ansible/roles/neutron/tasks/do_reconfigure.yml | 18 +++++++++--------- ansible/roles/neutron/tasks/pull.yml | 8 ++++---- ansible/roles/neutron/tasks/start.yml | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ansible/roles/neutron/tasks/deploy.yml b/ansible/roles/neutron/tasks/deploy.yml index 657db4795c..9aba99ec8a 100644 --- a/ansible/roles/neutron/tasks/deploy.yml +++ b/ansible/roles/neutron/tasks/deploy.yml @@ -7,7 +7,7 @@ - include: config.yml when: inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -23,7 +23,7 @@ - include: start.yml when: inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] diff --git a/ansible/roles/neutron/tasks/do_reconfigure.yml b/ansible/roles/neutron/tasks/do_reconfigure.yml index 6441c96f3f..1218d6c2e9 100644 --- a/ansible/roles/neutron/tasks/do_reconfigure.yml +++ b/ansible/roles/neutron/tasks/do_reconfigure.yml @@ -21,7 +21,7 @@ when: - ( ( inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -43,7 +43,7 @@ failed_when: container_state.Running == false when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -70,7 +70,7 @@ when: - ( ( inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -90,7 +90,7 @@ failed_when: false when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -118,7 +118,7 @@ when: - ( ( inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -138,7 +138,7 @@ action: "get_container_env" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -171,7 +171,7 @@ - item[1]['rc'] == 1 - ( ( inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -236,7 +236,7 @@ - item[1]['rc'] == 1 - ( ( inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -262,7 +262,7 @@ - item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - item[1]['rc'] == 1 - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) diff --git a/ansible/roles/neutron/tasks/pull.yml b/ansible/roles/neutron/tasks/pull.yml index 54061e48a7..9c5a4cbc6e 100644 --- a/ansible/roles/neutron/tasks/pull.yml +++ b/ansible/roles/neutron/tasks/pull.yml @@ -20,7 +20,7 @@ image: "{{ neutron_linuxbridge_agent_image_full }}" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -40,7 +40,7 @@ image: "{{ neutron_openvswitch_agent_image_full }}" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -60,7 +60,7 @@ image: "{{ openvswitch_db_image_full }}" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -73,7 +73,7 @@ image: "{{ openvswitch_vswitchd_image_full }}" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index 90f8a6b9c6..a4895b5bb3 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -11,7 +11,7 @@ - "openvswitch_db:/var/lib/openvswitch/" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -26,7 +26,7 @@ delay: 2 when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -38,7 +38,7 @@ changed_when: status.stdout.find('changed') != -1 when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -57,7 +57,7 @@ - "/run:/run" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent']) @@ -89,7 +89,7 @@ when: - ( ( inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'] @@ -139,7 +139,7 @@ - "kolla_logs:/var/log/kolla/" when: - (inventory_hostname in groups['compute'] - or inventory_hostname in groups['manila-share'] + or (enable_manila | bool and inventory_hostname in groups['manila-share']) or inventory_hostname in groups['neutron-dhcp-agent'] or inventory_hostname in groups['neutron-l3-agent'] or inventory_hostname in groups['neutron-metadata-agent'])