Files
fedora-infra_ansible/roles/odcs/backend/tasks/main.yml
2018-08-30 13:44:08 +00:00

68 lines
1.3 KiB
YAML

---
- name: Install the httpd package, just to get the apache group on the system.
package:
pkg: httpd
state: present
tags:
- packages
- odcs
- odcs/backend
- name: Make sure Python2 fedmsg-hub isn't running.
service:
name: fedmsg-hub
state: stopped
enabled: false
tags:
- odcs
- odcs/backend
- name: Make sure httpd isn't running.
service:
name: httpd
state: stopped
enabled: false
tags:
- odcs
- odcs/backend
- name: generate the ODCS koji config
template:
src: etc/koji.conf.d/odcs.conf.j2
dest: /etc/koji.conf.d/odcs.conf
owner: odcs
group: fedmsg
mode: 0440
notify:
- restart fedmsg-hub-3
tags:
- odcs
- odcs/backend
- name: add the odcs user to the apache group
user:
name: odcs
group: apache
groups: apache
append: true
notify:
- restart fedmsg-hub-3
tags:
- odcs
- odcs/backend
- name: migrate the database
command: "{{ item }}"
with_items:
- odcs-manager upgradedb
- odcs-manager db migrate
become: yes
become_user: odcs
when: odcs_migrate_db
tags:
- odcs
- odcs/backend
- name: Make sure fedmsg-hub-3 is running (we used to turn it off).
service:
name: fedmsg-hub-3
state: started
enabled: true
tags:
- odcs
- odcs/backend