From 07f04462c36de206a30019c0c1afe93061e11568 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 8 Aug 2016 13:51:44 +0200 Subject: [PATCH] Move mod_wsgi to a role rather than a included tasks --- 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 +- playbooks/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 +- playbooks/hosts/modernpaste.fedorainfracloud.org.yml | 2 +- {files/mod_wsgi => roles/mod_wsgi/files}/wsgi.conf | 0 roles/mod_wsgi/handlers/main.yml | 2 ++ {tasks => roles/mod_wsgi/tasks}/mod_wsgi.yml | 2 +- 37 files changed, 37 insertions(+), 39 deletions(-) rename {files/mod_wsgi => roles/mod_wsgi/files}/wsgi.conf (100%) create mode 100644 roles/mod_wsgi/handlers/main.yml rename {tasks => roles/mod_wsgi/tasks}/mod_wsgi.yml (82%) diff --git a/playbooks/groups/ask.yml b/playbooks/groups/ask.yml index e52b1fb1a2..574e309dc6 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 52c5ac4f9a..47ec534ced 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 cff2680507..3f53cd99b6 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 1af41a4718..3ee7b82e97 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 27d4b16f8c..113eda6889 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 0a12c324fa..df9fac2b8b 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 9e343c00aa..c6eeaa1065 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 756fc372bd..afdc6a262a 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 bff9deb6f9..3243a22aca 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 3c9316613c..021b49245e 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 3bee8eaa47..ec2989bdf6 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 ac8264afbc..99fe0eb796 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 609fb46121..8ebfcf0493 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 5706119e80..9bbccdfb00 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 46ec3b8c2d..221b1d31d3 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 a21edf1b19..9314f57440 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 c4f837d0d1..b3d0da06b9 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 f07ee88de3..656c1396c5 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 bbc8468054..aea46eb7a3 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 1d426ad4d0..34d4bd3a83 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 afb8c7f133..3c49b35237 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 1d48752d3e..5237609bae 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 81e89971d4..a7f8505ff9 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 49e0fe1bb7..f57bed8927 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 95b70ff39e..9c3cc4dbff 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 3d1cd1e728..a0a61ad244 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 c7e66c2ab6..537694fb2a 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 ab32b1c73f..f781868368 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 c23a9a2dad..0628d17e8d 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 799d110957..1933031577 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 c120980507..d04bc38559 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 54784d80fd..848a8c1f44 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 aa7d3c729a..31185e2a00 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 996d764c50..7d07691ccc 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/files/mod_wsgi/wsgi.conf b/roles/mod_wsgi/files/wsgi.conf similarity index 100% rename from files/mod_wsgi/wsgi.conf rename to roles/mod_wsgi/files/wsgi.conf diff --git a/roles/mod_wsgi/handlers/main.yml b/roles/mod_wsgi/handlers/main.yml new file mode 100644 index 0000000000..f599732052 --- /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/tasks/mod_wsgi.yml b/roles/mod_wsgi/tasks/mod_wsgi.yml similarity index 82% rename from tasks/mod_wsgi.yml rename to roles/mod_wsgi/tasks/mod_wsgi.yml index c4d9deb893..06c8aa5397 100644 --- a/tasks/mod_wsgi.yml +++ b/roles/mod_wsgi/tasks/mod_wsgi.yml @@ -13,7 +13,7 @@ when: ansible_distribution_major_version|int > 21 - name: wsgi.conf - copy: src="{{ files }}/mod_wsgi/wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf + copy: src="wsgi.conf" dest=/etc/httpd/conf.d/wsgi.conf notify: - restart apache tags: