diff options
author | Mathieu Bridon <bochecha@fedoraproject.org> | 2014-07-15 12:12:43 +0200 |
---|---|---|
committer | Kevin Fenzi <kevin@scrye.com> | 2014-08-26 18:28:27 +0000 |
commit | 7916770b41e87e3b618ef76f6af51a6ed951e031 (patch) | |
tree | d2647a7d925839130a6be2fc0f237a4147877a38 | |
parent | 5132a5e46a4655aa48ab8650f0192d7e5d526ada (diff) | |
download | ansible-7916770b41e87e3b618ef76f6af51a6ed951e031.tar.gz ansible-7916770b41e87e3b618ef76f6af51a6ed951e031.tar.xz ansible-7916770b41e87e3b618ef76f6af51a6ed951e031.zip |
Add a new cgit/make_pkgs_list role
This will be needed to migrate Dist Git from puppet to ansible.
-rw-r--r-- | roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh | 13 | ||||
-rw-r--r-- | roles/cgit/make_pkgs_list/tasks/main.yml | 53 |
2 files changed, 66 insertions, 0 deletions
diff --git a/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh b/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh new file mode 100644 index 000000000..21b1c921d --- /dev/null +++ b/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh @@ -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 diff --git a/roles/cgit/make_pkgs_list/tasks/main.yml b/roles/cgit/make_pkgs_list/tasks/main.yml new file mode 100644 index 000000000..fcf1032f9 --- /dev/null +++ b/roles/cgit/make_pkgs_list/tasks/main.yml @@ -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'" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |