Skip to content

Commit

Permalink
Merge pull request #10 from tomasbedrich/patch-1
Browse files Browse the repository at this point in the history
Fixed compatibility with RHEL
  • Loading branch information
Johan Meiring authored Feb 1, 2017
2 parents 8f4b3b7 + 1a36500 commit 3ccf2c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- name: SFTP-Server | Restart sshd
service: name=ssh
service: name={{ 'ssh' if ansible_os_family == 'Debian' else 'sshd' }}
state=restarted
14 changes: 14 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
register: sftp_sshd_config_content
changed_when: True == False

- name: SFTP-Server | Ensure SELinux management package is present
package: name=libsemanage-python state=present
when: ansible_selinux

- name: SFTP-Server | Set SELinux booleans
seboolean:
name: "{{ item }}"
state: yes
persistent: yes
with_items:
- ssh_chroot_full_access
- ssh_chroot_rw_homedirs
when: ansible_selinux

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

0 comments on commit 3ccf2c5

Please sign in to comment.