Fix selinux contexts for public git repos
This commit is contained in:
parent
5269a9ab18
commit
ee90c2bf27
1 changed files with 92 additions and 0 deletions
|
@ -274,3 +274,95 @@
|
||||||
- selinux
|
- selinux
|
||||||
- httpd
|
- httpd
|
||||||
- httpd/website
|
- httpd/website
|
||||||
|
|
||||||
|
#
|
||||||
|
# set selinux context for public git repos
|
||||||
|
#
|
||||||
|
|
||||||
|
- name: check the selinux context of ansible
|
||||||
|
command: matchpathcon /git/ansible
|
||||||
|
register: webdir
|
||||||
|
always_run: yes
|
||||||
|
changed_when: "1 != 1"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: /git/ansible file contexts
|
||||||
|
command: semanage fcontext -a -t httpd_git_content_t "/git/ansible(/.*)?"
|
||||||
|
when: webdir.stdout.find('httpd_git_content_t') == -1
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: check the selinux context of badges
|
||||||
|
command: matchpathcon /git/badges
|
||||||
|
register: webdir
|
||||||
|
always_run: yes
|
||||||
|
changed_when: "1 != 1"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: /git/badges file contexts
|
||||||
|
command: semanage fcontext -a -t httpd_git_content_t "/git/badges(/.*)?"
|
||||||
|
when: webdir.stdout.find('httpd_git_content_t') == -1
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: check the selinux context of dns
|
||||||
|
command: matchpathcon /git/dns
|
||||||
|
register: webdir
|
||||||
|
always_run: yes
|
||||||
|
changed_when: "1 != 1"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: /git/dns file contexts
|
||||||
|
command: semanage fcontext -a -t httpd_git_content_t "/git/dns(/.*)?"
|
||||||
|
when: webdir.stdout.find('httpd_git_content_t') == -1
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: check the selinux context of infra-docs
|
||||||
|
command: matchpathcon /git/infra-docs
|
||||||
|
register: webdir
|
||||||
|
always_run: yes
|
||||||
|
changed_when: "1 != 1"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
||||||
|
- name: /git/infra-docs file contexts
|
||||||
|
command: semanage fcontext -a -t httpd_git_content_t "/git/infra-docs(/.*)?"
|
||||||
|
when: webdir.stdout.find('httpd_git_content_t') == -1
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- batcave
|
||||||
|
- selinux
|
||||||
|
- httpd
|
||||||
|
- httpd/website
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue