diff --git a/tasks/main.yml b/tasks/main.yml index e68a15c..49eddeb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -21,6 +21,7 @@ line: "Subsystem sftp internal-sftp -f AUTH -l VERBOSE" state: present notify: SFTP-Server | Restart sshd + when: sftp_configure_sshd - name: SFTP-Server | Ensure SELinux management package is present package: @@ -50,6 +51,7 @@ ForceCommand internal-sftp {{ sftp_enable_logging | ternary('-l VERBOSE', '') }} {{ (sftp_start_directory in sftp_directories) | ternary('-d /' + sftp_start_directory, '') }} PasswordAuthentication {{ sftp_allow_passwords | ternary('yes', 'no') }} notify: SFTP-Server | Restart sshd + when: sftp_configure_sshd - name: SFTP-Server | Create sftp user's group group: