Make the cgit role handle people cgit also.
This commit is contained in:
parent
70953f39be
commit
16ac719702
2 changed files with 31 additions and 0 deletions
17
roles/cgit/make_pkgs_list/files/make-people-git.sh
Executable file
17
roles/cgit/make_pkgs_list/files/make-people-git.sh
Executable 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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue