Move mod_wsgi to a role rather than a included tasks

This commit is contained in:
Michael Scherer 2016-08-08 13:51:44 +02:00 committed by Kevin Fenzi
parent 5cce9c0030
commit 07f04462c3
37 changed files with 37 additions and 39 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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:

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -0,0 +1,2 @@
- name: restart apache
command: /usr/local/bin/conditional-restart.sh httpd httpd

View file

@ -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: