diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 04d1900121..9036a37504 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -31,7 +31,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: cinder_api-back haproxy_state: disabled @@ -115,7 +116,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: cinder_api-back haproxy_state: enabled diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index c5ca129dd7..a96a8e8071 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -31,7 +31,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: neutron_server-back haproxy_state: disabled @@ -88,7 +89,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: neutron_server-back haproxy_state: enabled diff --git a/playbooks/common-tasks/haproxy-endpoint-manage.yml b/playbooks/common-tasks/haproxy-endpoint-manage.yml deleted file mode 100644 index c630ae951e..0000000000 --- a/playbooks/common-tasks/haproxy-endpoint-manage.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# Copyright 2017, Logan Vig -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- name: Set haproxy service state - community.general.haproxy: - socket: /var/run/haproxy.stat - backend: "{{ haproxy_backend | default(omit) }}" - drain: "{{ haproxy_drain | default(False) }}" - host: "{{ inventory_hostname }}" - state: "{{ haproxy_state | default('enabled') }}" - shutdown_sessions: "{{ haproxy_shutdown_sessions | default(False) | bool }}" - wait: "{{ haproxy_wait | default(False) | bool }}" - wait_interval: "{{ haproxy_wait_interval | default(5) }}" - wait_retries: "{{ haproxy_wait_retries | default(24) }}" - weight: "{{ haproxy_weight | default(omit) }}" - delegate_to: "{{ item }}" - with_items: "{{ groups['haproxy'] }}" - tags: - - common-haproxy diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index cd4bf7cb9a..ce2ab2ac68 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -53,7 +53,8 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: galera-back haproxy_state: drain @@ -69,7 +70,8 @@ - crontab post_tasks: - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: galera-back haproxy_state: enabled diff --git a/playbooks/os-adjutant-install.yml b/playbooks/os-adjutant-install.yml index f756487830..5eb61f3e2e 100644 --- a/playbooks/os-adjutant-install.yml +++ b/playbooks/os-adjutant-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: adjutant_api-back haproxy_state: disabled @@ -74,7 +75,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: adjutant_api-back haproxy_state: enabled diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index db25acdb13..9ba4c3b1d9 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -51,7 +51,8 @@ public: true - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: aodh_api-back haproxy_state: disabled @@ -80,7 +81,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: aodh_api-back haproxy_state: enabled diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index dbb1fd9b99..910893e5ad 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: barbican-back haproxy_state: disabled @@ -78,7 +79,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: barbican-back haproxy_state: enabled diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 10caeec30d..e6c3d8f5fc 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: blazar_api-back haproxy_state: disabled @@ -82,7 +83,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: blazar_api-back haproxy_state: enabled diff --git a/playbooks/os-cloudkitty-install.yml b/playbooks/os-cloudkitty-install.yml index efa26d1cac..2ce8574f78 100644 --- a/playbooks/os-cloudkitty-install.yml +++ b/playbooks/os-cloudkitty-install.yml @@ -51,7 +51,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: cloudkitty_api-back haproxy_state: disabled @@ -75,7 +76,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: cloudkitty_api-back haproxy_state: enabled diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index 0545b61728..b7a78b2df7 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -53,7 +53,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: designate_api-back haproxy_state: disabled @@ -81,7 +82,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: designate_api-back haproxy_state: enabled diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 3e76bafee0..8cabc7ea7f 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: glance_api-back haproxy_state: disabled @@ -94,7 +95,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: glance_api-back haproxy_state: enabled diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index b4f14933db..e43ec0cf8c 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: gnocchi-back haproxy_state: disabled @@ -82,7 +83,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: gnocchi-back haproxy_state: enabled diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index c979888071..252814b8f7 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: heat_api-back haproxy_state: disabled @@ -81,7 +82,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: heat_api-back haproxy_state: enabled diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index 613f93f271..471d1792da 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: horizon-back haproxy_state: disabled @@ -80,7 +81,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: horizon-back haproxy_state: enabled diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index 7465971437..9922e3ef40 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -50,7 +50,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: ironic_api-back haproxy_state: disabled @@ -81,7 +82,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: ironic_api-back haproxy_state: enabled diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index 70c7cc16ab..aa619bd731 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -82,7 +82,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: "keystone_service-back" haproxy_state: disabled @@ -117,7 +118,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: "keystone_service-back" haproxy_state: enabled diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index db6cb22051..000bf5f96b 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -53,7 +53,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: magnum-back haproxy_state: disabled @@ -82,7 +83,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: magnum-back haproxy_state: enabled diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index 3e80b60893..05f7ed4de8 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -59,7 +59,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: manila-back haproxy_state: disabled @@ -83,7 +84,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: manila-back haproxy_state: enabled diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index 2ba024c6b9..66706bc7c9 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -81,7 +81,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: masakari_api-back haproxy_state: disabled @@ -110,7 +111,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: masakari_api-back haproxy_state: enabled diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index 597afc4ab2..8e48aacfc1 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -51,7 +51,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: mistral-back haproxy_state: disabled @@ -83,7 +84,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: mistral-back haproxy_state: enabled diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 8216b3ae21..1c583ed075 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -77,7 +77,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: "{{ backend_name }}-back" haproxy_state: disabled @@ -121,7 +122,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: "{{ backend_name }}-back" haproxy_state: enabled diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 8c3cf77320..fa56221f61 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -51,7 +51,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: octavia-back haproxy_state: disabled @@ -82,7 +83,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: octavia-back haproxy_state: enabled diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index 02a2b4a94c..566feda79a 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -51,7 +51,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: placement-back haproxy_state: disabled @@ -82,7 +83,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: placement-back haproxy_state: enabled diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index f6474522a6..836e1908b6 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -51,7 +51,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: tacker-back haproxy_state: disabled @@ -72,7 +73,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: tacker-back haproxy_state: enabled diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 25f2291743..47160dc211 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -54,7 +54,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: trove-back haproxy_state: disabled @@ -82,7 +83,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: trove-back haproxy_state: enabled diff --git a/playbooks/os-zun-install.yml b/playbooks/os-zun-install.yml index eba08e2e61..0095564e50 100644 --- a/playbooks/os-zun-install.yml +++ b/playbooks/os-zun-install.yml @@ -67,7 +67,8 @@ # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. - name: Disabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: zun_api-back haproxy_state: disabled @@ -96,7 +97,8 @@ # the load balancer back end for this container # to available again. - name: Enabling haproxy backends - include_tasks: common-tasks/haproxy-endpoint-manage.yml + include_role: + name: openstack.osa.haproxy_endpoint_manage vars: haproxy_backend: zun_api-back haproxy_state: enabled