Files
fedora-infra_ansible/roles/testdays/tasks/main.yml
Michal Konecny 2ec055db6f Use first uppercase letter for all handlers
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>
2025-02-10 20:31:49 +00:00

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