SELinux support is optional

This commit is contained in:
Ian Young 2016-01-02 00:14:04 -08:00
parent a668e0f852
commit 1dfadb6011

View File

@ -4,12 +4,15 @@
- name: Install Samba packages - name: Install Samba packages
action: "{{ ansible_pkg_mgr }} pkg={{ item }} state=installed" action: "{{ ansible_pkg_mgr }} pkg={{ item }} state=installed"
with_items: with_items:
- libsemanage-python
- samba-common - samba-common
- samba - samba
- samba-client - samba-client
tags: samba tags: samba
- name: Install SELinux package
action: "{{ ansible_pkg_mgr }} pkg=libsemanage-python state=installed"
when: ansible_selinux
- name: Make sure SELinux boolean settings are correct - name: Make sure SELinux boolean settings are correct
seboolean: seboolean:
name: "{{ item }}" name: "{{ item }}"
@ -18,7 +21,7 @@
with_items: with_items:
- samba_enable_home_dirs - samba_enable_home_dirs
- samba_export_all_rw - samba_export_all_rw
tags: samba when: ansible_selinux
- name: Create Samba shares root directory - name: Create Samba shares root directory
file: file: