summaryrefslogtreecommitdiffstats
path: root/roles/loopabull
diff options
context:
space:
mode:
authorAdam Miller <admiller@redhat.com>2017-06-01 22:25:42 +0000
committerAdam Miller <admiller@redhat.com>2017-06-01 22:25:42 +0000
commitfc3c0fc11250553ec6fa97722ad569e29d57ef7c (patch)
treea6d38cddbb5860907dbb99c0d5fe14fc16d33367 /roles/loopabull
parent8a1db42043bec8576deb7582826d1b4f37789fe6 (diff)
downloadansible-fc3c0fc11250553ec6fa97722ad569e29d57ef7c.tar.gz
ansible-fc3c0fc11250553ec6fa97722ad569e29d57ef7c.tar.xz
ansible-fc3c0fc11250553ec6fa97722ad569e29d57ef7c.zip
move loopabull@ start into role, setup handler for template
Signed-off-by: Adam Miller <admiller@redhat.com>
Diffstat (limited to 'roles/loopabull')
-rw-r--r--roles/loopabull/handlers/main.yml9
-rw-r--r--roles/loopabull/tasks/main.yml19
2 files changed, 28 insertions, 0 deletions
diff --git a/roles/loopabull/handlers/main.yml b/roles/loopabull/handlers/main.yml
index e222efcc5..05534c688 100644
--- a/roles/loopabull/handlers/main.yml
+++ b/roles/loopabull/handlers/main.yml
@@ -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
diff --git a/roles/loopabull/tasks/main.yml b/roles/loopabull/tasks/main.yml
index 3aae32863..bb2b1012b 100644
--- a/roles/loopabull/tasks/main.yml
+++ b/roles/loopabull/tasks/main.yml
@@ -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
+