Split out selinux setup in subversion test.
This avoids failures when the sefcontext module is not present.
This commit is contained in:
parent
8d574c3770
commit
a928db1420
2 changed files with 13 additions and 12 deletions
|
@ -24,18 +24,8 @@
|
|||
path: '{{ subversion_server_dir }}'
|
||||
state: directory
|
||||
|
||||
- name: set SELinux security context for SVN folder
|
||||
sefcontext:
|
||||
target: '{{ subversion_server_dir }}(/.*)?'
|
||||
setype: '{{ item }}'
|
||||
state: present
|
||||
when: ansible_selinux.status == "enabled"
|
||||
with_items:
|
||||
- httpd_sys_content_t
|
||||
- httpd_sys_rw_content_t
|
||||
|
||||
- name: apply new SELinux context to filesystem
|
||||
command: restorecon -irv {{ subversion_server_dir | quote }}
|
||||
- name: setup selinux when enabled
|
||||
include_tasks: setup_selinux.yml
|
||||
when: ansible_selinux.status == "enabled"
|
||||
|
||||
- name: template out configuration file
|
||||
|
|
11
test/integration/targets/subversion/tasks/setup_selinux.yml
Normal file
11
test/integration/targets/subversion/tasks/setup_selinux.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
- name: set SELinux security context for SVN folder
|
||||
sefcontext:
|
||||
target: '{{ subversion_server_dir }}(/.*)?'
|
||||
setype: '{{ item }}'
|
||||
state: present
|
||||
with_items:
|
||||
- httpd_sys_content_t
|
||||
- httpd_sys_rw_content_t
|
||||
|
||||
- name: apply new SELinux context to filesystem
|
||||
command: restorecon -irv {{ subversion_server_dir | quote }}
|
Loading…
Reference in a new issue