Make the cgit role handle people cgit also.

This commit is contained in:
Kevin Fenzi 2015-06-17 14:46:39 +00:00
parent 70953f39be
commit 16ac719702
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,17 @@
#!/bin/bash
outfile=`mktemp`
finalfile=/var/www/git/cgit.repos
for homedir in /home/fedora/* ; do
if [ ! -d $homedir/public_git ]; then
continue
fi
for gitdir in $homedir/public_git/* ; do
if [ ! -f $gitdir/git-daemon-export-ok ]; then
continue
fi
echo $gitdir | sed -e 's;^/home/fedora/;;' >> $outfile
done
done
cp -f $outfile $finalfile

View file

@ -12,6 +12,11 @@
- name: install the script
copy: src=make-cgit-pkgs-list.sh dest=/usr/local/bin/make-cgit-pkgs-list.sh mode=0755
when: not inventory_hostname.startswith('people')
- name: install the script for fedorapeople
copy: src=make-people-git.sh dest=/usr/local/bin/make-people-git.sh mode=0755
when: inventory_hostname.startswith('people')
- name: install the cron job
cron: >
@ -19,6 +24,15 @@
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'"
when: not inventory_hostname.startswith('people')
- name: install the cron job for fedora people cgit
cron: >
name="make-people-git" cron_file="make-people-git"
minute=*/10
user=root
job="/usr/local/bin/lock-wrapper make-people-git '/usr/local/bin/make-people-git.sh | /usr/local/bin/nag-once fassync 1d 2>&1'"
when: inventory_hostname.startswith('people')
- name: check the selinux context of the repo list
command: matchpathcon /srv/git/pkgs-git-repos-list