From 8a6719517bd4a1628af3293704120ece5a992242 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Tue, 27 Jan 2015 15:33:45 +0100 Subject: [PATCH] Revert "distgit: Merge in the cgit/make_pkgs_list role" This reverts commit a29f50a19a3839c12e609a22f8cd319e553da7a0. Turns out, Fedora People needs this as well, so it needs to remain separated. Sorry for the noise! --- .../files/make-cgit-pkgs-list.sh | 0 roles/cgit/make_pkgs_list/tasks/main.yml | 33 +++++++++++++++++++ roles/distgit/tasks/main.yml | 30 ----------------- 3 files changed, 33 insertions(+), 30 deletions(-) rename roles/{distgit => cgit/make_pkgs_list}/files/make-cgit-pkgs-list.sh (100%) create mode 100644 roles/cgit/make_pkgs_list/tasks/main.yml diff --git a/roles/distgit/files/make-cgit-pkgs-list.sh b/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh similarity index 100% rename from roles/distgit/files/make-cgit-pkgs-list.sh rename to roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh diff --git a/roles/cgit/make_pkgs_list/tasks/main.yml b/roles/cgit/make_pkgs_list/tasks/main.yml new file mode 100644 index 0000000000..c2e699d6ca --- /dev/null +++ b/roles/cgit/make_pkgs_list/tasks/main.yml @@ -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 diff --git a/roles/distgit/tasks/main.yml b/roles/distgit/tasks/main.yml index f6140dcc99..4a78126a98 100644 --- a/roles/distgit/tasks/main.yml +++ b/roles/distgit/tasks/main.yml @@ -210,36 +210,6 @@ notify: - 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 ------------------------------------- # This is the annex to Dist Git, where we host source tarballs.