--- files/mod_wsgi/wsgi.conf | 14 -------------- playbooks/groups/ask.yml | 2 +- playbooks/groups/autocloud-web.yml | 2 +- playbooks/groups/badges-web.yml | 2 +- playbooks/groups/basset.yml | 2 +- playbooks/groups/blockerbugs.yml | 2 +- playbooks/groups/bodhi2.yml | 2 +- playbooks/groups/datagrepper.yml | 2 +- playbooks/groups/elections.yml | 2 +- playbooks/groups/fas.yml | 2 +- playbooks/groups/fas3.yml | 2 +- playbooks/groups/fedocal.yml | 2 +- playbooks/groups/github2fedmsg.yml | 2 +- playbooks/groups/ipa.yml | 2 +- playbooks/groups/ipsilon.yml | 2 +- playbooks/groups/kerneltest.yml | 2 +- playbooks/groups/koschei-web.yml | 2 +- playbooks/groups/mailman.yml | 2 +- playbooks/groups/mdapi.yml | 2 +- playbooks/groups/mirrorlist2.yml | 2 +- playbooks/groups/noc.yml | 2 +- playbooks/groups/notifs-web.yml | 2 +- playbooks/groups/nuancier.yml | 2 +- playbooks/groups/packages.yml | 2 +- playbooks/groups/pdc.yml | 4 +--- playbooks/groups/pkgdb.yml | 2 +- playbooks/groups/statscache.yml | 4 +--- playbooks/groups/sundries.yml | 2 +- playbooks/groups/tagger.yml | 2 +- playbooks/groups/zanata2fedmsg.yml | 2 +- .../hosts/grafana.cloud.fedoraproject.org.yml | 2 +- playbooks/hosts/graphite.fedorainfracloud.org.yml | 2 +- playbooks/hosts/iddev.fedorainfracloud.org.yml | 2 +- playbooks/hosts/lists-dev.fedorainfracloud.org.yml | 2 +- .../hosts/modernpaste.fedorainfracloud.org.yml | 2 +- roles/mod_wsgi/files/wsgi.conf | 14 ++++++++++++++ roles/mod_wsgi/handlers/main.yml | 2 ++ roles/mod_wsgi/tasks/mod_wsgi.yml | 22 ++++++++++++++++++++++ tasks/mod_wsgi.yml | 22 ---------------------- 39 files changed, 72 insertions(+), 74 deletions(-) delete mode 100644 files/mod_wsgi/wsgi.conf create mode 100644 roles/mod_wsgi/files/wsgi.conf create mode 100644 roles/mod_wsgi/handlers/main.yml create mode 100644 roles/mod_wsgi/tasks/mod_wsgi.yml delete mode 100644 tasks/mod_wsgi.yml
diff --git a/files/mod_wsgi/wsgi.conf b/files/mod_wsgi/wsgi.conf deleted file mode 100644 index 6c32a15..0000000 --- a/files/mod_wsgi/wsgi.conf +++ /dev/null @@ -1,14 +0,0 @@ -LoadModule wsgi_module modules/mod_wsgi.so - -# Some apps, notably anything that uses hg, need these off -WSGIRestrictStdin Off -WSGIRestrictStdout Off - -# Put the socket somewhere writable -WSGISocketPrefix run/wsgi - -# Do not Optimize without stripping docstrings -WSGIPythonOptimize 0 - -# Set WSGIApplicationGroup to global -WSGIApplicationGroup %{GLOBAL} diff --git a/playbooks/groups/ask.yml b/playbooks/groups/ask.yml index e52b1fb..574e309 100644 --- a/playbooks/groups/ask.yml +++ b/playbooks/groups/ask.yml @@ -18,6 +18,7 @@ - fas_client - collectd/base - apache + - mod_wsgi - ask - fedmsg/base - rsyncd @@ -29,7 +30,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/autocloud-web.yml b/playbooks/groups/autocloud-web.yml index 52c5ac4..47ec534 100644 --- a/playbooks/groups/autocloud-web.yml +++ b/playbooks/groups/autocloud-web.yml @@ -21,6 +21,7 @@ - fas_client - collectd/base - apache + - mod_wsgi - fedmsg/base - sudo - role: openvpn/client @@ -29,7 +30,6 @@ tasks: - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/badges-web.yml b/playbooks/groups/badges-web.yml index cff2680..3f53cd9 100644 --- a/playbooks/groups/badges-web.yml +++ b/playbooks/groups/badges-web.yml @@ -29,6 +29,7 @@ - sudo - { role: openvpn/client, when: env != "staging" } + - mod_wsgi - role: collectd/web-service site: frontpage url: "http://localhost/" @@ -42,7 +43,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/basset.yml b/playbooks/groups/basset.yml index 1af41a4..3ee7b82 100644 --- a/playbooks/groups/basset.yml +++ b/playbooks/groups/basset.yml @@ -26,6 +26,7 @@ - mongodb - rabbitmq - apache + - mod_wsgi - basset/frontend - basset/worker
@@ -33,7 +34,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/blockerbugs.yml b/playbooks/groups/blockerbugs.yml index 27d4b16..113eda6 100644 --- a/playbooks/groups/blockerbugs.yml +++ b/playbooks/groups/blockerbugs.yml @@ -23,13 +23,13 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi - blockerbugs
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/bodhi2.yml b/playbooks/groups/bodhi2.yml index 0a12c32..df9fac2 100644 --- a/playbooks/groups/bodhi2.yml +++ b/playbooks/groups/bodhi2.yml @@ -22,6 +22,7 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi - { role: bodhi2/base, when: "inventory_hostname.startswith('bodhi0')" } - { role: fedmsg/base, when: "inventory_hostname.startswith('bodhi0')" }
@@ -29,7 +30,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/datagrepper.yml b/playbooks/groups/datagrepper.yml index 9e343c0..c6eeaa1 100644 --- a/playbooks/groups/datagrepper.yml +++ b/playbooks/groups/datagrepper.yml @@ -25,12 +25,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/elections.yml b/playbooks/groups/elections.yml index 756fc37..afdc6a2 100644 --- a/playbooks/groups/elections.yml +++ b/playbooks/groups/elections.yml @@ -21,13 +21,13 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi - collectd/base
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/fas.yml b/playbooks/groups/fas.yml index bff9deb..3243a22 100644 --- a/playbooks/groups/fas.yml +++ b/playbooks/groups/fas.yml @@ -22,6 +22,7 @@ - rsyncd - memcached - apache + - mod_wsgi - fas_server - fedmsg/base - sudo @@ -33,7 +34,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/fas3.yml b/playbooks/groups/fas3.yml index 3c93166..021b492 100644 --- a/playbooks/groups/fas3.yml +++ b/playbooks/groups/fas3.yml @@ -22,6 +22,7 @@ - rsyncd - memcached - apache + - mod_wsgi - fas3_server - fedmsg/base - sudo @@ -33,7 +34,6 @@ - include: "{{ tasks }}/yumrepos.yml" #- include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/fedocal.yml b/playbooks/groups/fedocal.yml index 3bee8ea..ec2989b 100644 --- a/playbooks/groups/fedocal.yml +++ b/playbooks/groups/fedocal.yml @@ -21,13 +21,13 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi - collectd/base
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/github2fedmsg.yml b/playbooks/groups/github2fedmsg.yml index ac8264a..99fe0eb 100644 --- a/playbooks/groups/github2fedmsg.yml +++ b/playbooks/groups/github2fedmsg.yml @@ -27,12 +27,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/ipa.yml b/playbooks/groups/ipa.yml index 609fb46..8ebfcf0 100644 --- a/playbooks/groups/ipa.yml +++ b/playbooks/groups/ipa.yml @@ -20,12 +20,12 @@ - sudo - { role: openvpn/client, when: env != "staging" } + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/ipsilon.yml b/playbooks/groups/ipsilon.yml index 5706119..9bbccdf 100644 --- a/playbooks/groups/ipsilon.yml +++ b/playbooks/groups/ipsilon.yml @@ -26,12 +26,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/kerneltest.yml b/playbooks/groups/kerneltest.yml index 46ec3b8..221b1d3 100644 --- a/playbooks/groups/kerneltest.yml +++ b/playbooks/groups/kerneltest.yml @@ -27,12 +27,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/koschei-web.yml b/playbooks/groups/koschei-web.yml index a21edf1..9314f57 100644 --- a/playbooks/groups/koschei-web.yml +++ b/playbooks/groups/koschei-web.yml @@ -20,13 +20,13 @@ - collectd/base - { role: sudo, sudoers: "{{ private }}/files/sudo/koschei01-sudoers" } - { role: openvpn/client, when: env != "staging" } + - mod_wsgi - koschei/frontend
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/mailman.yml b/playbooks/groups/mailman.yml index c4f837d..b3d0da0 100644 --- a/playbooks/groups/mailman.yml +++ b/playbooks/groups/mailman.yml @@ -26,13 +26,13 @@ when: env != "staging" } - apache - spamassassin + - mod_wsgi
tasks: # this is how you include other task lists - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/mdapi.yml b/playbooks/groups/mdapi.yml index f07ee88..656c139 100644 --- a/playbooks/groups/mdapi.yml +++ b/playbooks/groups/mdapi.yml @@ -21,12 +21,12 @@ - { role: openvpn/client, when: env != "staging" } - collectd/base + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/mirrorlist2.yml b/playbooks/groups/mirrorlist2.yml index bbc8468..aea46eb 100644 --- a/playbooks/groups/mirrorlist2.yml +++ b/playbooks/groups/mirrorlist2.yml @@ -56,6 +56,7 @@ - fas_client - collectd/base - apache + - mod_wsgi - httpd/mod_ssl
- role: httpd/certificate @@ -95,7 +96,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: diff --git a/playbooks/groups/noc.yml b/playbooks/groups/noc.yml index 1d426ad..34d4bd3 100644 --- a/playbooks/groups/noc.yml +++ b/playbooks/groups/noc.yml @@ -22,12 +22,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/notifs-web.yml b/playbooks/groups/notifs-web.yml index afb8c7f..3c49b35 100644 --- a/playbooks/groups/notifs-web.yml +++ b/playbooks/groups/notifs-web.yml @@ -23,6 +23,7 @@ - fas_client - collectd/base - apache + - mod_wsgi - fedmsg/base - notifs/frontend - sudo @@ -33,7 +34,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/nuancier.yml b/playbooks/groups/nuancier.yml index 1d48752..5237609 100644 --- a/playbooks/groups/nuancier.yml +++ b/playbooks/groups/nuancier.yml @@ -26,12 +26,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/packages.yml b/playbooks/groups/packages.yml index 81e8997..a7f8505 100644 --- a/playbooks/groups/packages.yml +++ b/playbooks/groups/packages.yml @@ -27,12 +27,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/pdc.yml b/playbooks/groups/pdc.yml index 49e0fe1..f57bed8 100644 --- a/playbooks/groups/pdc.yml +++ b/playbooks/groups/pdc.yml @@ -42,12 +42,10 @@ - role: openvpn/client when: env != "staging" - apache + - mod_wsgi - fedmsg/base - pdc/frontend
- tasks: - - include: "{{ tasks }}/mod_wsgi.yml" - - name: stuff just for the backend nodes hosts: pdc-backend:pdc-backend-stg user: root diff --git a/playbooks/groups/pkgdb.yml b/playbooks/groups/pkgdb.yml index 95b70ff..9c3cc4d 100644 --- a/playbooks/groups/pkgdb.yml +++ b/playbooks/groups/pkgdb.yml @@ -25,12 +25,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/statscache.yml b/playbooks/groups/statscache.yml index 3d1cd1e..a0a61ad 100644 --- a/playbooks/groups/statscache.yml +++ b/playbooks/groups/statscache.yml @@ -44,13 +44,11 @@
roles: - apache + - mod_wsgi - role: openvpn/client when: env != "staging" - statscache/frontend
- tasks: - - include: "{{ tasks }}/mod_wsgi.yml" - - name: Stuff just for the fedmsg backend hosts: statscache-backend:statscache-backend-stg user: root diff --git a/playbooks/groups/sundries.yml b/playbooks/groups/sundries.yml index c7e66c2..537694f 100644 --- a/playbooks/groups/sundries.yml +++ b/playbooks/groups/sundries.yml @@ -23,6 +23,7 @@ - fas_client - collectd/base - apache + - mod_wsgi - geoip - geoip-city-wsgi/app - role: koji_reminder @@ -56,7 +57,6 @@ - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/tagger.yml b/playbooks/groups/tagger.yml index ab32b1c..f781868 100644 --- a/playbooks/groups/tagger.yml +++ b/playbooks/groups/tagger.yml @@ -27,12 +27,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/groups/zanata2fedmsg.yml b/playbooks/groups/zanata2fedmsg.yml index c23a9a2..0628d17 100644 --- a/playbooks/groups/zanata2fedmsg.yml +++ b/playbooks/groups/zanata2fedmsg.yml @@ -27,12 +27,12 @@ - { role: openvpn/client, when: env != "staging" } - apache + - mod_wsgi
tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/hosts/grafana.cloud.fedoraproject.org.yml b/playbooks/hosts/grafana.cloud.fedoraproject.org.yml index 799d110..1933031 100644 --- a/playbooks/hosts/grafana.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/grafana.cloud.fedoraproject.org.yml @@ -24,6 +24,7 @@ - base - rkhunter - apache + - mod_wsgi #- graphite/graphite #- graphite/statsd #- graphite/fedmsg2statsd @@ -33,7 +34,6 @@ - include: "{{ tasks }}/yumrepos.yml" #- include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/hosts/graphite.fedorainfracloud.org.yml b/playbooks/hosts/graphite.fedorainfracloud.org.yml index c120980..d04bc38 100644 --- a/playbooks/hosts/graphite.fedorainfracloud.org.yml +++ b/playbooks/hosts/graphite.fedorainfracloud.org.yml @@ -24,6 +24,7 @@ - base - rkhunter - apache + - mod_wsgi - certbot - graphite/graphite - graphite/statsd @@ -33,7 +34,6 @@ - include: "{{ tasks }}/yumrepos.yml" #- include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/hosts/iddev.fedorainfracloud.org.yml b/playbooks/hosts/iddev.fedorainfracloud.org.yml index 54784d8..848a8c1 100644 --- a/playbooks/hosts/iddev.fedorainfracloud.org.yml +++ b/playbooks/hosts/iddev.fedorainfracloud.org.yml @@ -24,6 +24,7 @@ - sudo - hosts - apache + - mod_wsgi - base
pre_tasks: @@ -33,7 +34,6 @@ - include: "{{ tasks }}/cloud_setup_basic.yml" - name: set hostname (required by some services, at least postfix need it) hostname: name="{{inventory_hostname}}" - - include: "{{ tasks }}/mod_wsgi.yml"
handlers: - include: "{{ handlers }}/restart_services.yml" diff --git a/playbooks/hosts/lists-dev.fedorainfracloud.org.yml b/playbooks/hosts/lists-dev.fedorainfracloud.org.yml index aa7d3c7..31185e2 100644 --- a/playbooks/hosts/lists-dev.fedorainfracloud.org.yml +++ b/playbooks/hosts/lists-dev.fedorainfracloud.org.yml @@ -33,13 +33,13 @@ - sudo - hosts - apache + - mod_wsgi - base
tasks: - include: "{{ tasks }}/postfix_basic.yml" - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/motd.yml" - - include: "{{ tasks }}/mod_wsgi.yml"
# Basic Apache config - name: install mod_ssl diff --git a/playbooks/hosts/modernpaste.fedorainfracloud.org.yml b/playbooks/hosts/modernpaste.fedorainfracloud.org.yml index 996d764..7d07691 100644 --- a/playbooks/hosts/modernpaste.fedorainfracloud.org.yml +++ b/playbooks/hosts/modernpaste.fedorainfracloud.org.yml @@ -24,6 +24,7 @@ - sudo - hosts - apache + - mod_wsgi - base
pre_tasks: @@ -33,4 +34,3 @@ - include: "{{ tasks }}/cloud_setup_basic.yml" - name: set hostname (required by some services, at least postfix need it) hostname: name="{{inventory_hostname}}" - - include: "{{ tasks }}/mod_wsgi.yml" diff --git a/roles/mod_wsgi/files/wsgi.conf b/roles/mod_wsgi/files/wsgi.conf new file mode 100644 index 0000000..6c32a15 --- /dev/null +++ b/roles/mod_wsgi/files/wsgi.conf @@ -0,0 +1,14 @@ +LoadModule wsgi_module modules/mod_wsgi.so + +# Some apps, notably anything that uses hg, need these off +WSGIRestrictStdin Off +WSGIRestrictStdout Off + +# Put the socket somewhere writable +WSGISocketPrefix run/wsgi + +# Do not Optimize without stripping docstrings +WSGIPythonOptimize 0 + +# Set WSGIApplicationGroup to global +WSGIApplicationGroup %{GLOBAL} diff --git a/roles/mod_wsgi/handlers/main.yml b/roles/mod_wsgi/handlers/main.yml new file mode 100644 index 0000000..f599732 --- /dev/null +++ b/roles/mod_wsgi/handlers/main.yml @@ -0,0 +1,2 @@ +- name: restart apache + command: /usr/local/bin/conditional-restart.sh httpd httpd diff --git a/roles/mod_wsgi/tasks/mod_wsgi.yml b/roles/mod_wsgi/tasks/mod_wsgi.yml new file mode 100644 index 0000000..06c8aa5 --- /dev/null +++ b/roles/mod_wsgi/tasks/mod_wsgi.yml @@ -0,0 +1,22 @@ +--- +# install mod_wsgi +- name: install mod_wsgi + yum: name=mod_wsgi state=present + tags: + - packages + when: ansible_distribution_major_version|int < 22 + +- name: install mod_wsgi + dnf: name=mod_wsgi state=present + tags: + - packages + when: ansible_distribution_major_version|int > 21 + +- name: wsgi.conf + copy: src="wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf + notify: + - restart apache + tags: + - config + + diff --git a/tasks/mod_wsgi.yml b/tasks/mod_wsgi.yml deleted file mode 100644 index c4d9deb..0000000 --- a/tasks/mod_wsgi.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# install mod_wsgi -- name: install mod_wsgi - yum: name=mod_wsgi state=present - tags: - - packages - when: ansible_distribution_major_version|int < 22 - -- name: install mod_wsgi - dnf: name=mod_wsgi state=present - tags: - - packages - when: ansible_distribution_major_version|int > 21 - -- name: wsgi.conf - copy: src="{{ files }}/mod_wsgi/wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf - notify: - - restart apache - tags: - - config - -
--- roles/mod_wsgi/tasks/mod_wsgi.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/roles/mod_wsgi/tasks/mod_wsgi.yml b/roles/mod_wsgi/tasks/mod_wsgi.yml index 06c8aa5..89f9948 100644 --- a/roles/mod_wsgi/tasks/mod_wsgi.yml +++ b/roles/mod_wsgi/tasks/mod_wsgi.yml @@ -1,16 +1,11 @@ --- # install mod_wsgi - name: install mod_wsgi - yum: name=mod_wsgi state=present + pkg: + name: mod_wsgi + state: present tags: - packages - when: ansible_distribution_major_version|int < 22 - -- name: install mod_wsgi - dnf: name=mod_wsgi state=present - tags: - - packages - when: ansible_distribution_major_version|int > 21
- name: wsgi.conf copy: src="wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf @@ -18,5 +13,3 @@ - restart apache tags: - config - -
And make mod_wsgi depend on the role --- roles/apache/handlers/main.yml | 2 ++ roles/mod_wsgi/handlers/main.yml | 2 -- roles/mod_wsgi/meta/main.yml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 roles/apache/handlers/main.yml delete mode 100644 roles/mod_wsgi/handlers/main.yml create mode 100644 roles/mod_wsgi/meta/main.yml
diff --git a/roles/apache/handlers/main.yml b/roles/apache/handlers/main.yml new file mode 100644 index 0000000..f599732 --- /dev/null +++ b/roles/apache/handlers/main.yml @@ -0,0 +1,2 @@ +- name: restart apache + command: /usr/local/bin/conditional-restart.sh httpd httpd diff --git a/roles/mod_wsgi/handlers/main.yml b/roles/mod_wsgi/handlers/main.yml deleted file mode 100644 index f599732..0000000 --- a/roles/mod_wsgi/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: restart apache - command: /usr/local/bin/conditional-restart.sh httpd httpd diff --git a/roles/mod_wsgi/meta/main.yml b/roles/mod_wsgi/meta/main.yml new file mode 100644 index 0000000..d43ec26 --- /dev/null +++ b/roles/mod_wsgi/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: +- role: apache
--- playbooks/groups/ask.yml | 1 - playbooks/groups/autocloud-web.yml | 1 - playbooks/groups/badges-web.yml | 1 - playbooks/groups/basset.yml | 1 - playbooks/groups/blockerbugs.yml | 1 - playbooks/groups/datagrepper.yml | 1 - playbooks/groups/elections.yml | 1 - playbooks/groups/fas.yml | 1 - playbooks/groups/fas3.yml | 1 - playbooks/groups/fedocal.yml | 1 - playbooks/groups/github2fedmsg.yml | 1 - playbooks/groups/ipsilon.yml | 1 - playbooks/groups/kerneltest.yml | 1 - playbooks/groups/mailman.yml | 1 - playbooks/groups/mirrorlist2.yml | 1 - playbooks/groups/noc.yml | 1 - playbooks/groups/notifs-web.yml | 1 - playbooks/groups/nuancier.yml | 1 - playbooks/groups/packages.yml | 1 - playbooks/groups/pdc.yml | 1 - playbooks/groups/pkgdb.yml | 1 - playbooks/groups/statscache.yml | 1 - playbooks/groups/sundries.yml | 1 - playbooks/groups/tagger.yml | 1 - playbooks/groups/zanata2fedmsg.yml | 1 - playbooks/hosts/grafana.cloud.fedoraproject.org.yml | 1 - playbooks/hosts/graphite.fedorainfracloud.org.yml | 1 - playbooks/hosts/iddev.fedorainfracloud.org.yml | 1 - playbooks/hosts/lists-dev.fedorainfracloud.org.yml | 1 - playbooks/hosts/modernpaste.fedorainfracloud.org.yml | 1 - 30 files changed, 30 deletions(-)
diff --git a/playbooks/groups/ask.yml b/playbooks/groups/ask.yml index 574e309..ddb9468 100644 --- a/playbooks/groups/ask.yml +++ b/playbooks/groups/ask.yml @@ -17,7 +17,6 @@ - hosts - fas_client - collectd/base - - apache - mod_wsgi - ask - fedmsg/base diff --git a/playbooks/groups/autocloud-web.yml b/playbooks/groups/autocloud-web.yml index 47ec534..018ec22 100644 --- a/playbooks/groups/autocloud-web.yml +++ b/playbooks/groups/autocloud-web.yml @@ -20,7 +20,6 @@ - hosts - fas_client - collectd/base - - apache - mod_wsgi - fedmsg/base - sudo diff --git a/playbooks/groups/badges-web.yml b/playbooks/groups/badges-web.yml index 3f53cd9..2bf307d 100644 --- a/playbooks/groups/badges-web.yml +++ b/playbooks/groups/badges-web.yml @@ -22,7 +22,6 @@ - hosts - fas_client - collectd/base - - apache - badges/frontend - fedmsg/base - rsyncd diff --git a/playbooks/groups/basset.yml b/playbooks/groups/basset.yml index 3ee7b82..baa9991 100644 --- a/playbooks/groups/basset.yml +++ b/playbooks/groups/basset.yml @@ -25,7 +25,6 @@ when: env != "staging" } - mongodb - rabbitmq - - apache - mod_wsgi - basset/frontend - basset/worker diff --git a/playbooks/groups/blockerbugs.yml b/playbooks/groups/blockerbugs.yml index 113eda6..9a39f53 100644 --- a/playbooks/groups/blockerbugs.yml +++ b/playbooks/groups/blockerbugs.yml @@ -22,7 +22,6 @@ - rsyncd - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi - blockerbugs
diff --git a/playbooks/groups/datagrepper.yml b/playbooks/groups/datagrepper.yml index c6eeaa1..8e7e566 100644 --- a/playbooks/groups/datagrepper.yml +++ b/playbooks/groups/datagrepper.yml @@ -24,7 +24,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/elections.yml b/playbooks/groups/elections.yml index afdc6a2..2d9eb68 100644 --- a/playbooks/groups/elections.yml +++ b/playbooks/groups/elections.yml @@ -20,7 +20,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi - collectd/base
diff --git a/playbooks/groups/fas.yml b/playbooks/groups/fas.yml index 3243a22..0fad0c0 100644 --- a/playbooks/groups/fas.yml +++ b/playbooks/groups/fas.yml @@ -21,7 +21,6 @@ - collectd/base - rsyncd - memcached - - apache - mod_wsgi - fas_server - fedmsg/base diff --git a/playbooks/groups/fas3.yml b/playbooks/groups/fas3.yml index 021b492..a00fbda 100644 --- a/playbooks/groups/fas3.yml +++ b/playbooks/groups/fas3.yml @@ -21,7 +21,6 @@ - collectd/base - rsyncd - memcached - - apache - mod_wsgi - fas3_server - fedmsg/base diff --git a/playbooks/groups/fedocal.yml b/playbooks/groups/fedocal.yml index ec2989b..13ba0ac 100644 --- a/playbooks/groups/fedocal.yml +++ b/playbooks/groups/fedocal.yml @@ -20,7 +20,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi - collectd/base
diff --git a/playbooks/groups/github2fedmsg.yml b/playbooks/groups/github2fedmsg.yml index 99fe0eb..7bab6e6 100644 --- a/playbooks/groups/github2fedmsg.yml +++ b/playbooks/groups/github2fedmsg.yml @@ -26,7 +26,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/ipsilon.yml b/playbooks/groups/ipsilon.yml index 9bbccdf..d2b3d47 100644 --- a/playbooks/groups/ipsilon.yml +++ b/playbooks/groups/ipsilon.yml @@ -25,7 +25,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/kerneltest.yml b/playbooks/groups/kerneltest.yml index 221b1d3..a665d50 100644 --- a/playbooks/groups/kerneltest.yml +++ b/playbooks/groups/kerneltest.yml @@ -26,7 +26,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/mailman.yml b/playbooks/groups/mailman.yml index b3d0da0..8828022 100644 --- a/playbooks/groups/mailman.yml +++ b/playbooks/groups/mailman.yml @@ -24,7 +24,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - spamassassin - mod_wsgi
diff --git a/playbooks/groups/mirrorlist2.yml b/playbooks/groups/mirrorlist2.yml index aea46eb..66ad910 100644 --- a/playbooks/groups/mirrorlist2.yml +++ b/playbooks/groups/mirrorlist2.yml @@ -55,7 +55,6 @@ - hosts - fas_client - collectd/base - - apache - mod_wsgi - httpd/mod_ssl
diff --git a/playbooks/groups/noc.yml b/playbooks/groups/noc.yml index 34d4bd3..3b7cfc1 100644 --- a/playbooks/groups/noc.yml +++ b/playbooks/groups/noc.yml @@ -21,7 +21,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/notifs-web.yml b/playbooks/groups/notifs-web.yml index 3c49b35..cdc1297 100644 --- a/playbooks/groups/notifs-web.yml +++ b/playbooks/groups/notifs-web.yml @@ -22,7 +22,6 @@ - hosts - fas_client - collectd/base - - apache - mod_wsgi - fedmsg/base - notifs/frontend diff --git a/playbooks/groups/nuancier.yml b/playbooks/groups/nuancier.yml index 5237609..d9524d0 100644 --- a/playbooks/groups/nuancier.yml +++ b/playbooks/groups/nuancier.yml @@ -25,7 +25,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/packages.yml b/playbooks/groups/packages.yml index a7f8505..86f5b00 100644 --- a/playbooks/groups/packages.yml +++ b/playbooks/groups/packages.yml @@ -26,7 +26,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/pdc.yml b/playbooks/groups/pdc.yml index f57bed8..6768373 100644 --- a/playbooks/groups/pdc.yml +++ b/playbooks/groups/pdc.yml @@ -41,7 +41,6 @@ roles: - role: openvpn/client when: env != "staging" - - apache - mod_wsgi - fedmsg/base - pdc/frontend diff --git a/playbooks/groups/pkgdb.yml b/playbooks/groups/pkgdb.yml index 9c3cc4d..b4c61af 100644 --- a/playbooks/groups/pkgdb.yml +++ b/playbooks/groups/pkgdb.yml @@ -24,7 +24,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/statscache.yml b/playbooks/groups/statscache.yml index a0a61ad..f7404a9 100644 --- a/playbooks/groups/statscache.yml +++ b/playbooks/groups/statscache.yml @@ -43,7 +43,6 @@ - include: "{{ handlers }}/restart_services.yml"
roles: - - apache - mod_wsgi - role: openvpn/client when: env != "staging" diff --git a/playbooks/groups/sundries.yml b/playbooks/groups/sundries.yml index 537694f..6ba29ad 100644 --- a/playbooks/groups/sundries.yml +++ b/playbooks/groups/sundries.yml @@ -22,7 +22,6 @@ - hosts - fas_client - collectd/base - - apache - mod_wsgi - geoip - geoip-city-wsgi/app diff --git a/playbooks/groups/tagger.yml b/playbooks/groups/tagger.yml index f781868..db988da 100644 --- a/playbooks/groups/tagger.yml +++ b/playbooks/groups/tagger.yml @@ -26,7 +26,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/groups/zanata2fedmsg.yml b/playbooks/groups/zanata2fedmsg.yml index 0628d17..424c617 100644 --- a/playbooks/groups/zanata2fedmsg.yml +++ b/playbooks/groups/zanata2fedmsg.yml @@ -26,7 +26,6 @@ - sudo - { role: openvpn/client, when: env != "staging" } - - apache - mod_wsgi
tasks: diff --git a/playbooks/hosts/grafana.cloud.fedoraproject.org.yml b/playbooks/hosts/grafana.cloud.fedoraproject.org.yml index 1933031..a1fccf4 100644 --- a/playbooks/hosts/grafana.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/grafana.cloud.fedoraproject.org.yml @@ -23,7 +23,6 @@ roles: - base - rkhunter - - apache - mod_wsgi #- graphite/graphite #- graphite/statsd diff --git a/playbooks/hosts/graphite.fedorainfracloud.org.yml b/playbooks/hosts/graphite.fedorainfracloud.org.yml index d04bc38..a80e64e 100644 --- a/playbooks/hosts/graphite.fedorainfracloud.org.yml +++ b/playbooks/hosts/graphite.fedorainfracloud.org.yml @@ -23,7 +23,6 @@ roles: - base - rkhunter - - apache - mod_wsgi - certbot - graphite/graphite diff --git a/playbooks/hosts/iddev.fedorainfracloud.org.yml b/playbooks/hosts/iddev.fedorainfracloud.org.yml index 848a8c1..d96cc71 100644 --- a/playbooks/hosts/iddev.fedorainfracloud.org.yml +++ b/playbooks/hosts/iddev.fedorainfracloud.org.yml @@ -23,7 +23,6 @@ roles: - sudo - hosts - - apache - mod_wsgi - base
diff --git a/playbooks/hosts/lists-dev.fedorainfracloud.org.yml b/playbooks/hosts/lists-dev.fedorainfracloud.org.yml index 31185e2..d0fb1dd 100644 --- a/playbooks/hosts/lists-dev.fedorainfracloud.org.yml +++ b/playbooks/hosts/lists-dev.fedorainfracloud.org.yml @@ -32,7 +32,6 @@ roles: - sudo - hosts - - apache - mod_wsgi - base
diff --git a/playbooks/hosts/modernpaste.fedorainfracloud.org.yml b/playbooks/hosts/modernpaste.fedorainfracloud.org.yml index 7d07691..6715096 100644 --- a/playbooks/hosts/modernpaste.fedorainfracloud.org.yml +++ b/playbooks/hosts/modernpaste.fedorainfracloud.org.yml @@ -23,7 +23,6 @@ roles: - sudo - hosts - - apache - mod_wsgi - base
I've applied these patches, on top I had to fix 'pkg' as the module is 'package'.
But otherwise it seems ok from a quick glance.
Thanks!
kevin
infrastructure@lists.fedoraproject.org