Need some pretasks here, in particular the /srv/web directory needs to exist
This commit is contained in:
parent
b22685d524
commit
2fc8221d26
1 changed files with 32 additions and 0 deletions
|
@ -29,6 +29,38 @@
|
|||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
pre_tasks:
|
||||
- name: Install policycoreutils-python
|
||||
yum: pkg=policycoreutils-python state=present
|
||||
|
||||
- name: Create /srv/web/ for all the goodies.
|
||||
file: >
|
||||
dest=/srv/web state=directory
|
||||
owner=root group=root mode=0755
|
||||
tags:
|
||||
- httpd
|
||||
- httpd/website
|
||||
|
||||
- name: check the selinux context of webdir
|
||||
command: matchpathcon /srv/web
|
||||
register: webdir
|
||||
always_run: yes
|
||||
changed_when: "1 != 1"
|
||||
tags:
|
||||
- config
|
||||
- selinux
|
||||
- httpd
|
||||
- httpd/website
|
||||
|
||||
- name: /srv/web file contexts
|
||||
command: semanage fcontext -a -t httpd_sys_content_t "/srv/web(/.*)?"
|
||||
when: webdir.stdout.find('httpd_sys_content_t') == -1
|
||||
tags:
|
||||
- config
|
||||
- selinux
|
||||
- httpd
|
||||
- httpd/website
|
||||
|
||||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue