Files
fedora-infra_ansible/roles/testdays/tasks/main.yml
Patrick Uiterwijk 08568865fe Replace all restart httpd with reload httpd
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-11-04 23:40:01 +00:00

35 lines
1.1 KiB
YAML

---
- name: ensure packages required for testdays are installed
action: yum name={{ item }} state=latest
with_items:
- testdays
- mod_wsgi
- python-psycopg2
- python-fedora
- name: ensure database is created
delegate_to: "{{ testdays_db_host }}"
sudo_user: postgres
sudo: true
action: postgresql_db db={{ testdays_db_name }}
- name: ensure testdays db user has access to database
delegate_to: "{{ testdays_db_host }}"
sudo_user: postgres
sudo: true
action: postgresql_user db={{ testdays_db_name }} user={{ testdays_db_user }} password={{ testdays_db_password }} role_attr_flags=NOSUPERUSER
- name: ensure selinux lets httpd talk to postgres
seboolean: name=httpd_can_network_connect_db persistent=yes state=yes
- name: generate testdays config
template: src=settings.py.j2 dest=/etc/testdays/settings.py owner=root group=root mode=0644
notify:
- reload httpd
- name: generate testdays apache config
template: src=testdays.conf.j2 dest=/etc/httpd/conf.d/testdays.conf owner=root group=root mode=0644
notify:
- reload httpd