diff --git a/roles/bugyou/tasks/main.yml b/roles/bugyou/bugyou-master/tasks/main.yml similarity index 57% rename from roles/bugyou/tasks/main.yml rename to roles/bugyou/bugyou-master/tasks/main.yml index f251606614..3bc86c9a69 100644 --- a/roles/bugyou/tasks/main.yml +++ b/roles/bugyou/bugyou-master/tasks/main.yml @@ -1,27 +1,15 @@ --- # Configuration for Bugyou -- name: install needed packages +- name: install needed packages for bugyou yum: pkg={{ item }} state=present with_items: - - python-libpagure - bugyou notify: - restart fedmsg-hub tags: - bugyou -- name: copy bugyou service configuration - template: > - src={{ item }} dest=/etc/bugyou/{{ item }} - owner=root group=fedmsg mode=0640 - with_items: - - bugyou.cfg - notify: - - restart fedmsg-hub - tags: - - bugyou - - name: copy bugyou fedmsg configuration template: > src={{ item }} dest=/etc/fedmsg.d/{{ item }} diff --git a/roles/bugyou/templates/bugyou.py b/roles/bugyou/bugyou-master/templates/bugyou.py similarity index 100% rename from roles/bugyou/templates/bugyou.py rename to roles/bugyou/bugyou-master/templates/bugyou.py diff --git a/roles/bugyou/bugyou-plugins/tasks/main.yml b/roles/bugyou/bugyou-plugins/tasks/main.yml new file mode 100644 index 0000000000..cf128cf5af --- /dev/null +++ b/roles/bugyou/bugyou-plugins/tasks/main.yml @@ -0,0 +1,32 @@ +--- +# Configuration for Bugyou Plugins + +- name: install needed packages for bugyou_plugins + yum: pkg={{ item }} state=present + with_items: + - python-libpagure + - bugyou_plugins + notify: + - restart fedmsg-hub + tags: + - bugyou/plugins + +- name: copy bugyou plugins configuration files + template: > + src={{ item }} + dest=/etc/bugyou/{{ item }} + owner=root + group=fedmsg + mode=0640 + with_items: + - bugyou_plugins.cfg + - bugyou_services.cfg + notify: + - restart fedmsg-hub + tags: + - bugyou/plugins + +- name: start the bugyou-cntrl + service: name=bugyou-cntrl state=started + tags: + - bugyou/plugins diff --git a/roles/bugyou/bugyou-plugins/templates/bugyou_plugins.cfg b/roles/bugyou/bugyou-plugins/templates/bugyou_plugins.cfg new file mode 100644 index 0000000000..8f6bc1c235 --- /dev/null +++ b/roles/bugyou/bugyou-plugins/templates/bugyou_plugins.cfg @@ -0,0 +1,3 @@ +[autocloud] +services = pagure +topic = org.fedoraproject.prod.autocloud.image.success, org.fedoraproject.prod.autocloud.image.failed diff --git a/roles/bugyou/bugyou-plugins/templates/bugyou_services.cfg b/roles/bugyou/bugyou-plugins/templates/bugyou_services.cfg new file mode 100644 index 0000000000..bbb1e6e015 --- /dev/null +++ b/roles/bugyou/bugyou-plugins/templates/bugyou_services.cfg @@ -0,0 +1,8 @@ +[autocloud_pagure] +{% if env == 'staging' %} +repo_name = atomic-images-test +access_token = {{bugyou_stg_pagure_atomic_images_api_key}} +{% else %} +repo_name = atomic-images +access_token = {{bugyou_pagure_atomic_images_api_key}} +{% endif %} diff --git a/roles/bugyou/templates/bugyou.cfg b/roles/bugyou/templates/bugyou.cfg deleted file mode 100644 index 2aee1f509d..0000000000 --- a/roles/bugyou/templates/bugyou.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[general] -repo_name = atomic-images -access_token = {{bugyou_pagure_atomic_images_api_key}}