|
|
|
@@ -128,18 +128,13 @@ |
|
|
|
validate_certs: yes |
|
|
|
when: customise_base_domain_website is undefined |
|
|
|
|
|
|
|
- name: Ensure group "sftp" exists |
|
|
|
group: |
|
|
|
name: sftp |
|
|
|
state: present |
|
|
|
|
|
|
|
- name: If user doesn't define a sftp_password, create a disabled 'sftp' account |
|
|
|
user: |
|
|
|
name: sftp |
|
|
|
comment: SFTP user to set custom web files and access servers export |
|
|
|
shell: /bin/false |
|
|
|
home: /home/sftp |
|
|
|
group: sftp |
|
|
|
group: matrix |
|
|
|
password: '*' |
|
|
|
update_password: always |
|
|
|
when: sftp_password|length == 0 |
|
|
|
@@ -150,15 +145,20 @@ |
|
|
|
comment: SFTP user to set custom web files and access servers export |
|
|
|
shell: /bin/false |
|
|
|
home: /home/sftp |
|
|
|
group: sftp |
|
|
|
group: matrix |
|
|
|
password: "{{ sftp_password | password_hash('sha512') }}" |
|
|
|
update_password: always |
|
|
|
when: sftp_password|length > 0 |
|
|
|
|
|
|
|
- name: Ensure group "sftp" exists |
|
|
|
group: |
|
|
|
name: sftp |
|
|
|
state: present |
|
|
|
|
|
|
|
- name: adding existing user 'sftp' to group matrix |
|
|
|
user: |
|
|
|
name: sftp |
|
|
|
groups: matrix |
|
|
|
groups: sftp |
|
|
|
append: yes |
|
|
|
when: customise_base_domain_website is defined |
|
|
|
|
|
|
|
@@ -214,14 +214,14 @@ |
|
|
|
group: sftp |
|
|
|
mode: '0644' |
|
|
|
when: (sftp_public_key | length > 0) and (sftp_auth_method == "SSH Key") |
|
|
|
|
|
|
|
- name: Alter SSH Subsystem State 1 |
|
|
|
|
|
|
|
- name: Remove any existing Subsystem lines |
|
|
|
lineinfile: |
|
|
|
path: /etc/ssh/sshd_config |
|
|
|
line: "Subsystem sftp /usr/lib/openssh/sftp-server" |
|
|
|
state: absent |
|
|
|
regexp: '^Subsystem' |
|
|
|
|
|
|
|
- name: Alter SSH Subsystem State 2 |
|
|
|
- name: Set SSH Subsystem State |
|
|
|
lineinfile: |
|
|
|
path: /etc/ssh/sshd_config |
|
|
|
insertafter: "^# override default of no subsystems" |
|
|
|
|