Add mod_wsgi.actions and libdnf plugin, to restart httpd.
Signed-off-by: James Antill <james@and.org>
This commit is contained in:
parent
fb4e2937a3
commit
0405924e26
2 changed files with 37 additions and 0 deletions
19
roles/mod_wsgi/files/mod_wsgi.actions
Normal file
19
roles/mod_wsgi/files/mod_wsgi.actions
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Requirements: yum install libdnf5-plugin-actions
|
||||||
|
|
||||||
|
# At the end of the DNF transaction
|
||||||
|
# if python3-mod_wsgi has (re)installed/(up|down)graded then
|
||||||
|
# restart HTTPD
|
||||||
|
# if python3-libs has (re)installed/(up|down)graded then
|
||||||
|
# restart HTTPD
|
||||||
|
# (will run the cmd twice on if they both change on (up/down)grades)
|
||||||
|
# Doesn't do anything if either are removed.
|
||||||
|
post_transaction:python3-mod_wsgi:in:enabled=host-only:/bin/systemctl try-restart --no-block httpd.service
|
||||||
|
post_transaction:python3-libs:in:enabled=host-only:/bin/systemctl try-restart --no-block httpd.service
|
||||||
|
|
||||||
|
# Uncomment this line to do the same thing when it's removed
|
||||||
|
# (will run the cmd twice on (up/down)grades)
|
||||||
|
# post_transaction:python3-mod_wsgi:out:enabled=host-only:/bin/systemctl try-restart --no-block httpd.service
|
||||||
|
|
||||||
|
# This is for python2-mod_wsgi ... probably DNF5 doesn't exist, or this package
|
||||||
|
# doesn't.
|
||||||
|
# post_transaction:python2-mod_wsgi:in:enabled=host-only:/bin/systemctl try-restart --no-block httpd.service
|
|
@ -30,3 +30,21 @@
|
||||||
- Restart apache
|
- Restart apache
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
# These next two should eventually be: install mod_wsgi-dnf5-actions
|
||||||
|
- name: Install libdnf actions plugin
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: libdnf5-plugin-actions
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- packages
|
||||||
|
# This is currently Fedora-40+ ... no RHEL, no EPEL
|
||||||
|
when: ansible_distribution == 'Fedora'
|
||||||
|
|
||||||
|
- name: Wsgi libdnf actions
|
||||||
|
ansible.builtin.copy: src="mod_wsgi.actions" dest=/etc/dnf/libdnf5-plugins/actions.d
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
# This does nothing without the above plugin, although we could install it
|
||||||
|
# everywhere.
|
||||||
|
when: ansible_distribution == 'Fedora'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue