Set the SELinux context of /var/tmp/bodhi-bz.cookie to httpd_tmp_t

This commit is contained in:
Luke Macken 2014-03-11 18:41:12 +00:00
parent 1ca82167e0
commit d9f82bdd7f

View file

@ -71,21 +71,15 @@
tags: tags:
- config - config
- name: install /var/tmp/bodhi-bz.cookie file - name: check the selinux context of the bugzilla cookie
copy: > command: matchpathcon /var/tmp/bodhi-bz.cookie
dest=/var/tmp/bodhi-bz.cookie register: cookiecontext
owner=bodhi always_run: yes
group=bodhi changed_when: "1 != 1"
mode=0600
content="placeholder"
force=no
tags:
- config
- name: Make sure bodhi-bz.cookie is httpd_tmp_t for selinux. - name: set the SELinux policy for the bugzilla cookie
file: > command: semanage fcontext -a -t httpd_tmp_t "/var/tmp/bodhi-bz.cookie"
setype=httpd_tmp_t when: cookiecontext.stdout.find('httpd_tmp_t') == -1
dest=/var/tmp/bodhi-bz.cookie
tags: tags:
- config - config