Files
fedora-infra_ansible/roles/mote/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

143 lines
3.2 KiB
YAML

---
# Configuration for the mote webapp
- name: Install needed packages
ansible.builtin.package: name={{ item }} state=present
with_items:
- mote
- memcached
tags:
- packages
- mote
- name: Set the memcached sysconfig file
ansible.builtin.copy:
src: memcached.sysconfig
dest: /etc/sysconfig/memcached
tags:
- mote
notify:
- Restart memcached
- name: Make systemd override dir
ansible.builtin.file:
state: directory
path: /etc/systemd/system/memcached.service.d
mode: "0755"
owner: root
group: root
tags:
- mote
- name: Make systemd override config
ansible.builtin.copy:
src: memcached.override
dest: /etc/systemd/system/memcached.service.d/override.conf
tags:
- mote
notify:
- Reload systemd
- Restart memcached
- meta: flush_handlers
- name: Start memcached
service:
state: started
enabled: yes
name: memcached
tags:
- mote
- name: Replace the mote configuration file by the one with the normal user
ansible.builtin.template: src={{ item.file }}
dest="{{ item.location }}/{{ item.file }}"
owner=apache group=apache mode=0600
with_items:
- { file: config.py, location: /etc/mote }
- { file: mote.conf, location: /etc/httpd/conf.d }
- { file: mote.wsgi, location: /usr/share/mote }
- { file: category_mappings.json, location: /usr/share/mote }
- { file: name_mappings.json, location: /usr/share/mote }
tags:
- config
- mote
notify:
- Nuke mote json cache
- Restart apache
- name: Create /usr/share/httpd/.local for mote-updater to store the fedmsg CRL
ansible.builtin.file: dest=/usr/share/httpd/.local owner=apache group=apache state=directory
tags:
- mote
- name: Start mote-updater service
service: name=mote-updater state=started enabled=yes
tags:
- services
- mote
- name: Apply selinux type to static files
ansible.builtin.file: >
dest=/usr/lib/python2.7/site-packages/mote/static/
setype=httpd_sys_content_t
state=directory
recurse=yes
tags:
- mote
- selinux
- name: Apply selinux type to meetbot files
ansible.builtin.file: >
dest=/srv/web/meetbot/
setype=httpd_sys_content_t
state=directory
recurse=yes
tags:
- mote
- selinux
- name: Set sebooleans so apache can use memcached
seboolean: name=httpd_can_network_memcache
state=true
persistent=true
tags:
- mote
- selinux
- name: Set sebooleans so apache can use nfs
seboolean: name=httpd_use_nfs
state=true
persistent=true
tags:
- mote
- selinux
- name: Apply selinux type to the wsgi file
ansible.builtin.file: >
dest=/usr/share/mote/mote.wsgi
setype=httpd_sys_content_t
tags:
- mote
- selinux
- name: Apply selinux type to the name mappings file
ansible.builtin.file: >
dest=/usr/share/mote/name_mappings.json
setype=httpd_sys_content_t
notify:
- Nuke mote json cache
tags:
- mote
- selinux
- name: Apply selinux type to the category mappings file
ansible.builtin.file: >
dest=/usr/share/mote/category_mappings.json
setype=httpd_sys_content_t
notify:
- Nuke mote json cache
tags:
- mote
- selinux