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 0000000000..21b1c921d2 --- /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 0000000000..fcf1032f90 --- /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'" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +