From 63b5981152ce5686ac302511ab50015dc1595b8d Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 1 Feb 2022 03:52:55 -0500 Subject: [PATCH] Remove legacy nginx cleanup tasks Change-Id: Ia3f22083aab60bca3a64f989f2f94120a95504b9 --- tasks/keystone_install.yml | 40 -------------------------------------- 1 file changed, 40 deletions(-) diff --git a/tasks/keystone_install.yml b/tasks/keystone_install.yml index ef9f043f..aa2b9a7d 100644 --- a/tasks/keystone_install.yml +++ b/tasks/keystone_install.yml @@ -47,46 +47,6 @@ - ansible_facts['pkg_mgr'] == 'dnf' - keystone_sp != {} -# TODO(noonedeadpunk): Remove nginx-related changes in Y release -- name: Remove nginx keystone vhost configuration - file: - path: "/etc/nginx/{{ (ansible_facts['os_family'] | lower == 'debian') | ternary('sites-available', 'conf.d') }}/{{ item }}.conf" - state: absent - with_items: "{{ keystone_services.keys() | list }}" - register: nginx_vhosts - -- name: Remove nginx symlink for vhost configuration - file: - path: /etc/nginx/sites-enabled/{{ item }}.conf - state: absent - with_items: "{{ keystone_services.keys() | list }}" - when: ansible_facts['os_family'] == "Debian" - -- name: Reload nginx if needed - service: - name: "nginx" - state: restarted - failed_when: false - when: nginx_vhosts is changed - -# If the web server being removed was never installed, this task will fail when trying -# to stop/disable it. The task is therefore set to never fail. -- name: Remove nginx web server - when: "('repo_all' in groups and inventory_hostname not in groups['repo_all']) or ('repo_all' not in groups)" - block: - - name: Ensure nginx web server is not running/enabled - service: - name: "nginx" - enabled: no - state: stopped - failed_when: false - - - name: Remove nginx server distro packages - package: - name: "nginx" - state: absent - autoremove: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" - - name: Install distro packages package: name: "{{ keystone_package_list }}"