Add a new cgit/make_pkgs_list role
This will be needed to migrate Dist Git from puppet to ansible.
This commit is contained in:
parent
5132a5e46a
commit
7916770b41
2 changed files with 66 additions and 0 deletions
13
roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh
Normal file
13
roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh
Normal file
|
@ -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
|
53
roles/cgit/make_pkgs_list/tasks/main.yml
Normal file
53
roles/cgit/make_pkgs_list/tasks/main.yml
Normal file
|
@ -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'"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue