Files
fedora-infra_ansible/roles/odcs/backend/tasks/main.yml
2018-05-29 05:45:39 +00:00

61 lines
1.1 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 httpd isn't running.
service:
name: httpd
state: stopped
enabled: false
tags:
- odcs
- odcs/backend
- name: Make sure fedmsg-hub isn't running.
service:
name: fedmsg-hub
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: odcs
mode: 0440
notify:
- restart odcs-backend
tags:
- odcs
- odcs/backend
- name: add the odcs user to the apache group
user:
name: odcs
group: apache
groups: apache
append: true
notify:
- restart odcs-backend
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