132 lines
2.8 KiB
YAML
132 lines
2.8 KiB
YAML
---
|
|
# Configuration for the notifications consumer
|
|
|
|
- name: install needed packages
|
|
package: name={{ item }} state=present
|
|
with_items:
|
|
- koji
|
|
- fedmsg
|
|
- python-paramiko
|
|
- python-fedimg
|
|
- python-libcloud
|
|
- python-fedimg
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: install extra packages in staging
|
|
package: name={{ item }} state=present
|
|
with_items:
|
|
- euca2ools
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy manual trigger script
|
|
copy: >
|
|
src=trigger_upload.py
|
|
dest=/usr/local/bin/trigger_upload.py
|
|
mode=0755
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy base configuration
|
|
template: >
|
|
src=fedimg-conf.toml dest=/etc/fedimg/fedimg-conf.toml
|
|
owner=fedmsg group=fedmsg mode=0700
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy the euca2ools configuration file
|
|
template: >
|
|
src=fedimg-euca-conf.ini dest=/etc/euca2ools/conf.d/fedimg-euca-conf.ini
|
|
owner=fedmsg group=fedmsg mode=0700
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy fedimg fedmsg consumer
|
|
template: >
|
|
src=fedmsg.d/{{item}}
|
|
dest=/etc/fedmsg.d/{{item}}
|
|
owner=fedmsg
|
|
group=fedmsg
|
|
mode=0600
|
|
with_items:
|
|
- fedimg.py
|
|
- fedimg-logging.py
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: make pki directory
|
|
file: dest=/etc/pki/fedimg/ state=directory
|
|
owner=fedmsg group=fedmsg mode=0500
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy keys into pki directory for staging
|
|
copy: src={{private}}/files/fedimg/{{item}} dest=/etc/pki/fedimg/{{item}}
|
|
owner=fedmsg group=fedmsg mode=0400
|
|
with_items:
|
|
- fedimg-dev
|
|
- fedimg-dev.pub
|
|
notify:
|
|
- restart fedmsg-hub
|
|
when: env == "staging"
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy keys into pki directory for production
|
|
copy: src={{private}}/files/fedimg/{{item}} dest=/etc/pki/fedimg/{{item}}
|
|
owner=fedmsg group=fedmsg mode=0400
|
|
with_items:
|
|
- fedimg-prod
|
|
- fedimg-prod.pub
|
|
notify:
|
|
- restart fedmsg-hub
|
|
when: env != "staging"
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: ensure the fedmsg user has a homedir for cron to work in
|
|
file: >
|
|
state=directory
|
|
path=/usr/share/fedmsg
|
|
mode=700
|
|
owner=fedmsg
|
|
group=fedmsg
|
|
tags:
|
|
- cron
|
|
- fedimg
|
|
|
|
- name: ensure fedimg cron directories exist
|
|
file: >
|
|
state=directory
|
|
path={{ item }}
|
|
mode=755
|
|
owner=root
|
|
with_items:
|
|
- /usr/share/fedimg/cronjobs/
|
|
- /etc/cron.d/
|
|
tags:
|
|
- cron
|
|
- fedimg
|
|
|
|
- name: hotfix - copy the utils.py over to the site-packages
|
|
copy: src="{{ files }}/hotfix/fedimg/utils.py" dest=/usr/lib/python2.7/site-packages/fedimg/utils.py
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- fedimg
|
|
- hotfix
|
|
|
|
- name: hotfix - copy the ec2imgpublisher.py over to the site-packages
|
|
copy: src="{{ files }}/hotfix/fedimg/ec2imgpublisher.py" dest=/usr/lib/python2.7/site-packages/fedimg/services/ec2/ec2imgpublisher.py
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- fedimg
|
|
- hotfix
|