mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-12 19:06:39 +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>
87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
---
|
|
- name: Install needed packages for blockerbugs
|
|
ansible.builtin.package: state=present name={{ item }}
|
|
with_items:
|
|
- libselinux-python3
|
|
- python3-mod_wsgi
|
|
- blockerbugs
|
|
# this is for chronic which helps get rid of excess cron emails
|
|
- moreutils
|
|
tags:
|
|
- packages
|
|
- blockerbugs
|
|
|
|
- name: Setup blockerbugs apache conf
|
|
ansible.builtin.copy: src=blockerbugs.conf dest=/etc/httpd/conf.d/blockerbugs.conf mode=644
|
|
notify:
|
|
- Reload httpd
|
|
tags:
|
|
- config
|
|
- httpd
|
|
- blockerbugs
|
|
|
|
- name: Ensure group `blockerbugs` exists
|
|
group:
|
|
name: blockerbugs
|
|
state: present
|
|
tags:
|
|
- blockerbugs
|
|
- config
|
|
|
|
- name: Create the `blockerbugs` user
|
|
user:
|
|
name: blockerbugs
|
|
group: blockerbugs
|
|
ansible.builtin.shell: /bin/nologin
|
|
home: /usr/share/blockerbugs
|
|
tags:
|
|
- blockerbugs
|
|
- config
|
|
|
|
- name: Setup blockerbugs app settings file
|
|
ansible.builtin.template: src=blockerbugs-settings.py.j2 dest=/etc/blockerbugs/settings.py mode=640
|
|
notify:
|
|
- Reload httpd
|
|
tags:
|
|
- config
|
|
- httpd
|
|
- blockerbugs
|
|
|
|
- name: Grant blockerbugs and apache read access to the settings file
|
|
acl: name=/etc/blockerbugs/settings.py entity={{ item }} etype=user permissions="r" state=present
|
|
with_items:
|
|
- blockerbugs
|
|
- apache
|
|
notify:
|
|
- Reload httpd
|
|
tags:
|
|
- config
|
|
- httpd
|
|
- blockerbugs
|
|
|
|
- name: Allow httpd to connect to network, enabling openid
|
|
seboolean: name=httpd_can_network_connect state=true persistent=true
|
|
tags:
|
|
- config
|
|
- blockerbugs
|
|
|
|
- name: Set sebooleans so blockerbugs can talk to the db
|
|
seboolean: name=httpd_can_network_connect_db state=true persistent=true
|
|
tags:
|
|
- config
|
|
- blockerbugs
|
|
|
|
- name: Setup blockerbugs cron (master node only)
|
|
ansible.builtin.copy: src=blockerbugs.cron dest=/etc/cron.d/blockerbugs
|
|
when: master_blockerbugs_node
|
|
tags:
|
|
- config
|
|
- blockerbugs
|
|
|
|
# this is a "short-term" patch that won't be needed for future versions of blockerbugs
|
|
- name: Patch bz_interface to work with rhbz changes
|
|
ansible.builtin.copy: src=20210914-patched-bz_interface.py dest=/usr/lib/python3.9/site-packages/blockerbugs/util/bz_interface.py
|
|
when: master_blockerbugs_node
|
|
tags:
|
|
- blockerbugs
|