distgit: Merge in the cgit/make_pkgs_list role

Having it split out was causing trouble, because distgit depends on it,
but it depends on the /srv/git folder being created, which is created
in the distgit role...

Nothing else uses this though, so merging it is the easy way out.
This commit is contained in:
Mathieu Bridon 2015-01-27 15:31:17 +01:00
parent 12dea5d384
commit a29f50a19a
3 changed files with 30 additions and 33 deletions

View file

@ -1,33 +0,0 @@
---
# 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

View file

@ -210,6 +210,36 @@
notify: notify:
- restart httpd - restart httpd
- name: install the script to generate the repo list
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
# -- Lookaside Cache ------------------------------------- # -- Lookaside Cache -------------------------------------
# This is the annex to Dist Git, where we host source tarballs. # This is the annex to Dist Git, where we host source tarballs.