Merge "Correct variable used in SELinux context tasks"

This commit is contained in:
Zuul 2018-02-19 16:34:29 +00:00 committed by Gerrit Code Review
commit 90a567872f

View File

@ -64,12 +64,12 @@
- name: Set SELinux file contexts for neutron's log directory - name: Set SELinux file contexts for neutron's log directory
sefcontext: sefcontext:
target: "{{ (neutron_log_dir_check.stat.islnk) | ternary(neutron_log_dir.stat.lnk_target, neutron_log_dir) }}(/.*)?" target: "{{ (neutron_log_dir_check.stat.islnk) | ternary(neutron_log_dir_check.stat.lnk_target, neutron_log_dir) }}(/.*)?"
setype: neutron_log_t setype: neutron_log_t
state: present state: present
register: selinux_file_context_log_files register: selinux_file_context_log_files
- name: Apply updated SELinux contexts on neutron log directory - name: Apply updated SELinux contexts on neutron log directory
command: "restorecon -Rv {{ (neutron_log_dir_check.stat.islnk) | ternary(neutron_log_dir.stat.lnk_target, neutron_log_dir) }}" command: "restorecon -Rv {{ (neutron_log_dir_check.stat.islnk) | ternary(neutron_log_dir_check.stat.lnk_target, neutron_log_dir) }}"
when: when:
- selinux_file_context_log_files | changed - selinux_file_context_log_files | changed