---
# Configuration for Bugyou

- name: install needed packages for bugyou
  package: name={{ item }} state=present enablerepo=epel-testing
  with_items:
  - bugyou
  notify:
  - restart fedmsg-hub
  tags:
  - bugyou
  - bugyou/master

- name: copy bugyou fedmsg configuration
  template: >
    src={{ item }} dest=/etc/fedmsg.d/{{ item }}
    owner=root group=fedmsg mode=0640
  with_items:
  - bugyou.py
  notify:
  - restart fedmsg-hub
  tags:
  - bugyou
  - bugyou/master

# This is shipped in the package but leaks stg and prod
- name: Clear out endpoints-bugyou.py
  copy:
    dest: /etc/fedmsg.d/endpoints-bugyou.py
    content: 'config = {}'
