From e26aabe440b75d134ee90907656207445ddfcf64 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 14 Jun 2022 14:42:36 +0200 Subject: [PATCH] Remove mention of haproxy-endpoints role Keystone role was never migrated to usage of haproxy-endpoints role and included task was used instead the whole time. With that to reduce complexity and to have unified approach, all mention of the role and handler are removed from the code. Change-Id: Ib21a5f5caa590daa827e45d26015bf32abe39cf2 --- doc/source/index.rst | 13 ------------- handlers/main.yml | 4 ---- tasks/keystone_apache.yml | 10 ---------- tasks/keystone_db_sync.yml | 1 - tasks/keystone_federation_sp_shib_setup.yml | 5 ----- tasks/keystone_idp_setup.yml | 1 - tasks/keystone_install.yml | 2 -- tasks/keystone_ldap_setup.yml | 2 -- tasks/keystone_post_install.yml | 1 - 9 files changed, 39 deletions(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index f5426060..14e48ef7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -56,19 +56,6 @@ Example playbook .. literalinclude:: ../../examples/playbook.yml :language: yaml -External Restart Hooks -~~~~~~~~~~~~~~~~~~~~~~ - -When the role performs a restart of the service, it will notify an Ansible -handler named ``Manage LB``, which is a noop within this role. In the -playbook, other roles may be loaded before and after this role which will -implement Ansible handler listeners for ``Manage LB``, allowing external roles -to manage the load balancer endpoints responsible for sending traffic to the -servers being restarted by marking them in maintenance or active mode, -draining sessions, etc. For an example implementation, please reference the -`ansible-haproxy-endpoints role `_ -used by the openstack-ansible project. - Tags ~~~~ diff --git a/handlers/main.yml b/handlers/main.yml index e5f02a09..b0fccf6e 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -106,7 +106,3 @@ listen: flush cache when: - keystone_flush_memcache | bool - -- meta: noop - listen: Manage LB - when: false diff --git a/tasks/keystone_apache.yml b/tasks/keystone_apache.yml index 7005689e..f24eceb3 100644 --- a/tasks/keystone_apache.yml +++ b/tasks/keystone_apache.yml @@ -43,7 +43,6 @@ - ansible_facts['pkg_mgr'] == 'apt' - item.state == 'present' notify: - - Manage LB - Restart web server - name: Place apache2 config files @@ -54,7 +53,6 @@ group: "root" with_items: "{{ keystone_apache_configs }}" notify: - - Manage LB - Restart web server ## NOTE(cloudnull): @@ -68,7 +66,6 @@ - ansible_facts['pkg_mgr'] == 'apt' - item.state == 'absent' notify: - - Manage LB - Restart web server ## NOTE(andymccr): @@ -81,7 +78,6 @@ when: - ansible_facts['pkg_mgr'] == 'dnf' notify: - - Manage LB - Restart web server - name: Disable default apache site @@ -90,7 +86,6 @@ state: "absent" with_items: "{{ keystone_apache_default_sites }}" notify: - - Manage LB - Restart web server - name: Enabled keystone vhost @@ -102,7 +97,6 @@ - keystone_apache_site_available is defined - keystone_apache_site_enabled is defined notify: - - Manage LB - Restart web server - name: Ensure Apache ServerName @@ -110,7 +104,6 @@ dest: "{{ keystone_apache_conf }}" line: "ServerName {{ ansible_facts['hostname'] }}" notify: - - Manage LB - Restart web server - name: Ensure Apache ServerTokens @@ -119,7 +112,6 @@ regexp: '^ServerTokens' line: "ServerTokens {{ keystone_apache_servertokens }}" notify: - - Manage LB - Restart web server - name: Ensure Apache ServerSignature @@ -128,7 +120,6 @@ regexp: '^ServerSignature' line: "ServerSignature {{ keystone_apache_serversignature }}" notify: - - Manage LB - Restart web server - name: Remove Listen from Apache config @@ -138,5 +129,4 @@ backrefs: yes line: '#\1' notify: - - Manage LB - Restart web server diff --git a/tasks/keystone_db_sync.yml b/tasks/keystone_db_sync.yml index f92484d0..364b994d 100644 --- a/tasks/keystone_db_sync.yml +++ b/tasks/keystone_db_sync.yml @@ -66,7 +66,6 @@ (ansible_local['openstack_ansible']['keystone']['need_db_migrate'] | bool)" - "(item.status['LoadState'] == 'loaded' | bool)" notify: - - Manage LB - Restart uWSGI - name: Perform a Keystone DB sync expand diff --git a/tasks/keystone_federation_sp_shib_setup.yml b/tasks/keystone_federation_sp_shib_setup.yml index 6f5f1587..10138041 100644 --- a/tasks/keystone_federation_sp_shib_setup.yml +++ b/tasks/keystone_federation_sp_shib_setup.yml @@ -38,7 +38,6 @@ - { content: "{{ shibboleth_cert_user_content }}", dest: "/etc/shibboleth/sp-cert.pem" } - { content: "{{ shibboleth_key_user_content }}", dest: "/etc/shibboleth/sp-key.pem" } notify: - - Manage LB - Restart web server - Restart Shibd @@ -48,7 +47,6 @@ creates: "/etc/shibboleth/sp-cert.pem" when: _keystone_is_first_play_host notify: - - Manage LB - Restart web server - Restart Shibd @@ -81,7 +79,6 @@ mode: "0640" when: not _keystone_is_first_play_host notify: - - Manage LB - Restart web server - Restart Shibd @@ -94,7 +91,6 @@ mode: "0640" when: not _keystone_is_first_play_host notify: - - Manage LB - Restart web server - Restart Shibd @@ -108,6 +104,5 @@ - "/etc/shibboleth/sp-key.pem" when: not _keystone_is_first_play_host notify: - - Manage LB - Restart web server - Restart Shibd diff --git a/tasks/keystone_idp_setup.yml b/tasks/keystone_idp_setup.yml index 0f0763b9..61a45213 100644 --- a/tasks/keystone_idp_setup.yml +++ b/tasks/keystone_idp_setup.yml @@ -20,7 +20,6 @@ become_user: "{{ keystone_system_user_name }}" when: keystone_idp != {} notify: - - Manage LB - Restart uWSGI - name: Register service providers diff --git a/tasks/keystone_install.yml b/tasks/keystone_install.yml index aa2b9a7d..f13e541f 100644 --- a/tasks/keystone_install.yml +++ b/tasks/keystone_install.yml @@ -58,7 +58,6 @@ retries: 5 delay: 2 notify: - - Manage LB - Restart web server - name: Install/remove apache mod packages for federated authentication @@ -136,5 +135,4 @@ state: link force: yes notify: - - Manage LB - Restart web server diff --git a/tasks/keystone_ldap_setup.yml b/tasks/keystone_ldap_setup.yml index 5cc31249..b180e388 100644 --- a/tasks/keystone_ldap_setup.yml +++ b/tasks/keystone_ldap_setup.yml @@ -42,7 +42,6 @@ with_dict: "{{ keystone_ldap }}" no_log: true notify: - - Manage LB - Restart uWSGI - Restart web server @@ -55,6 +54,5 @@ state: absent when: keystone_ldap.Default is not defined notify: - - Manage LB - Restart uWSGI - Restart web server diff --git a/tasks/keystone_post_install.yml b/tasks/keystone_post_install.yml index d8d08dd0..25be7db4 100644 --- a/tasks/keystone_post_install.yml +++ b/tasks/keystone_post_install.yml @@ -37,7 +37,6 @@ config_overrides: "{{ keystone_keystone_conf_overrides }}" config_type: "ini" notify: - - Manage LB - Restart uWSGI - Restart web server