Revert "distgit: Merge in the cgit/make_pkgs_list role"
This reverts commit a29f50a19a
.
Turns out, Fedora People needs this as well, so it needs to remain
separated.
Sorry for the noise!
This commit is contained in:
parent
a29f50a19a
commit
8a6719517b
3 changed files with 33 additions and 30 deletions
14
roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh
Normal file
14
roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/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 -Z $newfile /srv/git/pkgs-git-repos-list
|
||||
chown apache:apache /srv/git/pkgs-git-repos-list
|
||||
chmod 644 /srv/git/pkgs-git-repos-list
|
33
roles/cgit/make_pkgs_list/tasks/main.yml
Normal file
33
roles/cgit/make_pkgs_list/tasks/main.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
# tasklist for setting up the CGit file list
|
||||
|
||||
- name: install the script
|
||||
copy: src=make-cgit-pkgs-list.sh dest=/usr/local/bin/make-cgit-pkgs-list.sh mode=0755
|
||||
|
||||
- name: install the cron job
|
||||
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'"
|
||||
|
||||
- name: ensure the repo list file exists
|
||||
file: path=/srv/git/pkgs-git-repos-list state=touch owner=apache group=apache mode=0644
|
||||
|
||||
- name: check the selinux context of the repo list
|
||||
command: matchpathcon /srv/git/pkgs-git-repos-list
|
||||
register: gitlistcontext
|
||||
always_run: yes
|
||||
changed_when: false
|
||||
tags:
|
||||
- config
|
||||
- cgit
|
||||
- selinux
|
||||
|
||||
- name: set the SELinux policy for the repo list
|
||||
command: semanage fcontext -a -t httpd_git_content_t "/srv/git/pkgs-git-repos-list"
|
||||
when: gitlistcontext.stdout.find('httpd_git_content_t') == -1
|
||||
tags:
|
||||
- config
|
||||
- cgit
|
||||
- selinux
|
Loading…
Add table
Add a link
Reference in a new issue