Rearrange some tasks

We have a gitolite/check_fedmsg_hooks role, which installs a script and
schedules it.

Turns out, this script does more than just checking the fedmsg hooks,
depending on the command-line arguments used when running it.

As such, it makes sense to separate it out into its own role, and make
the gitolite/check_fedmsg_hooks role (and any other one using the
script) depend on it.

For example, this script is used for Fedora Hosted (still in Puppet),
and will soon be used for a new distgit hook check.
This commit is contained in:
Mathieu Bridon 2014-09-23 14:14:24 +02:00 committed by Pierre-Yves Chibon
parent 7ab3ff2817
commit 16ffb744be
4 changed files with 18 additions and 9 deletions

View file

@ -0,0 +1,14 @@
---
# tasklist for setting up a git check script
#
# The script implements various checks (even though it is named check-perms,
# it checks more than perms), and various other roles can then use it in cron
# jobs, triggered by fedmsg, etc...
- name: install the needed packages
yum: pkg=git state=present
- name: install the script
copy: >
src=check-perms.py dest=/usr/local/bin/git-check-perms
owner=root group=root mode=0755

View file

@ -0,0 +1,3 @@
---
dependencies:
- { role: git/checks }

View file

@ -1,15 +1,7 @@
---
# tasklist for setting up Gitolite Fedmsg checks
- name: install the needed packages
yum: pkg=git state=present
- name: install the script
copy: >
src=check-perms.py dest=/usr/local/bin/git-check-perms
owner=root group=root mode=0755
- name: install the cron job for the script
- name: schedule check execution
cron: >
name="git-check-perms" cron_file="ansible-git-check-perms"
minute=10 hour=0 weekday=3