From a6aa7f79236ab7b18b07e2aaf6a16bf7173b9b26 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Fri, 8 May 2020 15:11:46 -0400 Subject: [PATCH] Make it so correct mod_wsgi gets installed on different versions of rhel --- roles/mod_wsgi/tasks/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/roles/mod_wsgi/tasks/main.yml b/roles/mod_wsgi/tasks/main.yml index 81cf0f9429..db90b46919 100644 --- a/roles/mod_wsgi/tasks/main.yml +++ b/roles/mod_wsgi/tasks/main.yml @@ -6,6 +6,23 @@ state: present tags: - packages + when: ansible_distribution_major_version|int < 8 and ansible_distribution == 'RedHat' + +- name: install mod_wsgi + package: + name: python3-mod_wsgi + state: present + tags: + - packages + when: ansible_distribution_major_version|int == 8 and ansible_distribution == 'RedHat' + +- name: install mod_wsgi + package: + name: mod_wsgi + state: present + tags: + - packages + when: ansible_distribution == 'Fedora' - name: wsgi.conf copy: src="wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf