mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 05:51:56 +08:00
This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
---
|
|
- name: Ensure packages required for testdays are installed
|
|
ansible.builtin.package: name={{ item }} state=present
|
|
with_items:
|
|
- testdays
|
|
- mod_wsgi
|
|
- python-psycopg2
|
|
- python-fedora
|
|
|
|
- name: Ensure database is created
|
|
delegate_to: "{{ testdays_db_host }}"
|
|
become_user: postgres
|
|
become: true
|
|
postgresql_db: db={{ testdays_db_name }}
|
|
|
|
- name: Ensure testdays db user has access to database
|
|
delegate_to: "{{ testdays_db_host }}"
|
|
become_user: postgres
|
|
become: true
|
|
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
|
|
ansible.builtin.template: src=settings.py.j2 dest=/etc/testdays/settings.py owner=root group=root mode=0644
|
|
notify:
|
|
- Reload httpd
|
|
|
|
- name: Generate testdays apache config
|
|
ansible.builtin.template: src=testdays.conf.j2 dest=/etc/httpd/conf.d/testdays.conf owner=root group=root mode=0644
|
|
notify:
|
|
- Reload httpd
|