Convert this over to using fcontext and checking so it doesn't do it everytime.
This commit is contained in:
parent
f631392507
commit
7e2b771742
1 changed files with 14 additions and 6 deletions
|
@ -78,14 +78,22 @@
|
||||||
- config
|
- config
|
||||||
- bodhi
|
- bodhi
|
||||||
|
|
||||||
- name: change type part of SELinux file context
|
- name: check the selinux context of comps
|
||||||
file: >
|
command: matchpathcon /var/tmp/bodhi/comps
|
||||||
dest=/var/tmp/bodhi/comps/
|
register: compsdir
|
||||||
setype=httpd_sys_script_rw_t
|
always_run: yes
|
||||||
state=directory
|
changed_when: "1 != 1"
|
||||||
recurse=yes
|
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
- selinux
|
||||||
|
- bodhi
|
||||||
|
|
||||||
|
- name: /var/tmp/bodhi/comps file contexts
|
||||||
|
command: semanage fcontext -a -t httpd_sys_script_rw_t "/var/tmp/bodhi/comps(/.*)?"
|
||||||
|
when: compsdir.stdout.find('httpd_sys_script_rw_t') == -1
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- selinux
|
||||||
- bodhi
|
- bodhi
|
||||||
|
|
||||||
#- name: change owner attribute of /var/tmp/bodhi-bz.cookie file
|
#- name: change owner attribute of /var/tmp/bodhi-bz.cookie file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue