mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-25 02:50:15 +08:00
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:
committed by
Pierre-Yves Chibon
parent
7ab3ff2817
commit
16ffb744be
14
roles/git/checks/tasks/main.yml
Normal file
14
roles/git/checks/tasks/main.yml
Normal 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
|
||||
3
roles/gitolite/check_fedmsg_hooks/meta/main.yml
Normal file
3
roles/gitolite/check_fedmsg_hooks/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- { role: git/checks }
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user