Skip to content

Commit

Permalink
Merge pull request #16 from derico-de/master
Browse files Browse the repository at this point in the history
make SELinux optional and disable it by default, fix semanage package name for Debian
  • Loading branch information
Johan Meiring authored Apr 9, 2017
2 parents f8acd61 + befc692 commit 7052625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ sftp_home_partition: /home
sftp_group_name: sftpusers
sftp_directories: []
sftp_allow_passwords: False
sftp_enable_selinux_support: False
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

- name: SFTP-Server | Ensure SELinux management package is present
package:
name: libsemanage-python
name: "{{ 'python-semanage' if ansible_distribution == 'Debian' else 'libsemanage-python' }}"
state: present
when: ansible_selinux
when: ansible_selinux and sftp_enable_selinux_support

- name: SFTP-Server | Set SELinux booleans
seboolean:
Expand All @@ -34,7 +34,7 @@
with_items:
- ssh_chroot_full_access
- ssh_chroot_rw_homedirs
when: ansible_selinux
when: ansible_selinux and sftp_enable_selinux_support

# Create/recreate ssh_config.
- name: SFTP-Server | Apply sshd_config template
Expand Down

0 comments on commit 7052625

Please sign in to comment.