120 lines
2.3 KiB
YAML
120 lines
2.3 KiB
YAML
---
|
|
# Configuration for the notifications consumer
|
|
|
|
- name: install needed packages
|
|
yum: pkg={{ item }} state=installed
|
|
with_items:
|
|
- koji
|
|
- fedmsg
|
|
- python-paramiko
|
|
- python-fedimg
|
|
- python-libcloud
|
|
- python-fedimg
|
|
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.cfg dest=/etc/fedimg.cfg
|
|
owner=fedmsg group=fedmsg mode=0700
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- fedimg
|
|
|
|
- name: copy koji fedmsg consumer
|
|
template: >
|
|
src=fedmsg.d/fedimg.py dest=/etc/fedmsg.d/fedimg.py
|
|
owner=fedmsg group=fedmsg mode=0600
|
|
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: fedimg cron scripts
|
|
copy: >
|
|
src=cron/{{ item }}
|
|
dest=/usr/share/fedimg/cronjobs/{{ item }}
|
|
owner=fedmsg
|
|
mode=744
|
|
with_items:
|
|
- kill_ec2_nodes.py
|
|
when: env != "staging"
|
|
tags:
|
|
- cron
|
|
- fedimg
|
|
|
|
- name: fedimg cron definitions
|
|
copy: >
|
|
src=cron/{{ item }}
|
|
dest=/etc/cron.d/{{ item }}
|
|
owner=root
|
|
mode=644
|
|
with_items:
|
|
- kill_ec2_nodes.cron
|
|
when: env != "staging"
|
|
tags:
|
|
- cron
|
|
- fedimg
|