ansible/roles/mbs/common/tasks/main.yml

102 lines
2.3 KiB
YAML
Raw Normal View History

2017-01-30 16:59:33 +00:00
---
# Common configuration for the Module Build Service (MBS) pieces
- name: install needed packages
package: name={{ item }} state=present
2017-01-30 16:59:33 +00:00
with_items:
- module-build-service
- python-psycopg2
- libsemanage-python
- python-memcached
notify:
- restart apache
- restart fedmsg-hub
tags:
- mbs
- mbs/common
- name: kill development configs
file: path=/etc/fedmsg.d/{{ item }} state=absent
with_items:
- module_build_service.py
- mbs-logging.py
2017-02-15 17:25:35 +00:00
notify:
- restart apache
- restart fedmsg-hub
tags:
- mbs
- mbs/common
2017-01-30 16:59:33 +00:00
- name: copy app configuration
template: >
src=config.py dest=/etc/module-build-service/config.py
owner=root group=fedmsg mode=0640
notify:
- restart apache
- restart fedmsg-hub
tags:
- mbs
- mbs/common
2017-03-01 21:24:38 +00:00
- name: copy koji configuration
template: >
src=koji.conf dest=/etc/module-build-service/koji.conf
owner=root group=fedmsg mode=0644
notify:
- restart fedmsg-hub
tags:
- mbs
- mbs/common
2017-02-15 17:19:39 +00:00
- name: copy fedmsg configuration
template: >
src=mbs-fedmsg.py dest=/etc/fedmsg.d/mbs-fedmsg.py
owner=root group=fedmsg mode=0644
notify:
- restart apache
- restart fedmsg-hub
tags:
- mbs
- mbs/common
- name: copy client secrets
template: >
src=client_secrets.json.{{env}} dest=/etc/module-build-service/client_secrets.json
2017-02-15 15:58:01 +00:00
owner=root group=fedmsg mode=0640
2017-02-15 15:53:34 +00:00
when: inventory_hostname.startswith('mbs-frontend')
notify:
- restart apache
tags:
- mbs
- mbs/common
2017-02-16 00:22:23 +00:00
- name: copy pdc client config file
copy: >
src=fedora.json.{{env}} dest=/etc/pdc.d/fedora.json
owner=root group=root mode=0644
notify:
- restart apache
- restart fedmsg-hub
tags:
- mbs
- mbs/common
- name: create /etc/module-build-service/default-modules directory
file:
path: /etc/module-build-service/default-modules
state: directory
owner: root
group: root
mode: 0775
- name: copy default modules to /etc/module-build-service/default-modules
copy: src={{ item }} dest=/etc/module-build-service/default-modules
with_fileglob:
- default-modules.{{ env }}/*.yaml
- name: import default-modules
command: /usr/bin/mbs-manager import_module /etc/module-build-service/default-modules/{{ item | basename }}
with_fileglob:
- default-modules.{{ env }}/*.yaml