Add a new cgit/make_pkgs_list role

This will be needed to migrate Dist Git from puppet to ansible.
This commit is contained in:
Mathieu Bridon 2014-07-15 12:12:43 +02:00 committed by Kevin Fenzi
parent 5132a5e46a
commit 7916770b41
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/bin/sh
#
# This simple script lists out the current pkgs git repos to a file.
# This speeds up cgit as it doesn't have to recurse into all dirs
# Looking for git repos.
#
newfile=`mktemp`
cd /srv/git/rpms
ls > $newfile
mv $newfile /srv/git/pkgs-git-repos-list
chmod 644 /srv/git/pkgs-git-repos-list

View file

@ -0,0 +1,53 @@
---
# tasklist for setting up the CGit file list
- name: install the script and schedule its execution
copy: src=make-cgit-pkgs-list.sh dest=/usr/local/bin/make-cgit-pkgs-list.sh mode=0755
cron: >
name="make-cgit-pkgs-list" cron_file="ansible-make-cgit-pkgs-list"
minute=*/10
user=root
job="/usr/local/bin/lock-wrapper make-cgit-pkgs-list '/usr/local/bin/make-cgit-pkgs-list.sh | /usr/local/bin/nag-once fassync 1d 2>&1'"