move loopabull@ start into role, setup handler for template

Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
Adam Miller 2017-06-01 22:25:42 +00:00
parent 8a1db42043
commit fc3c0fc112
3 changed files with 29 additions and 16 deletions

View file

@ -97,19 +97,4 @@
copy:
src: "{{files}}/loopabull/serializer.py"
dest: "/etc/fedmsg.d/serializer.py"
- name: Install the loopabull@.service template
copy:
src: "{{files}}/loopabull/loopabull@.service"
dest: "/usr/lib/systemd/system/loopabull@.service"
- name: start and enable loopabull@
service:
name: "{{ item }}"
state: started
enabled: yes
with_items:
- loopabull@1
- loopabull@2
- loopabull@3
- loopabull@4
- loopabull@5
notify: restart fedmsg-hub

View file

@ -1,2 +1,11 @@
---
# handlers file for loopabull
- name: restart loopabull
name: "{{ item }}"
state: restarted
with_items:
- loopabull@1
- loopabull@2
- loopabull@3
- loopabull@4
- loopabull@5

View file

@ -11,9 +11,28 @@
template:
src: loopabull.yml.j2
dest: /etc/loopabull.yml
notify: restart loopabull
- name: clone the playbooks repo into playbooks dir
git:
repo: "https://pagure.io/releng-automation.git"
dest: "{{playbooks_dir}}"
- name: Install the loopabull@.service template
copy:
src: "files/loopabull@.service"
dest: "/usr/lib/systemd/system/loopabull@.service"
notify: restart loopabull
- name: start and enable loopabull@
service:
name: "{{ item }}"
state: started
enabled: yes
with_items:
- loopabull@1
- loopabull@2
- loopabull@3
- loopabull@4
- loopabull@5