bit of work on ftp

autoautoinstall
Daniel Liu 1 year ago
parent 474487f1b7
commit ea46afcb00
  1. 43
      roles/ftp/tasks/main.yml
  2. 0
      roles/ftp/templates/blacklist.dat
  3. 0
      roles/ftp/templates/ldap.conf
  4. 0
      roles/ftp/templates/modules.conf
  5. 0
      roles/ftp/templates/proftpd.conf
  6. 0
      roles/ftp/templates/proftpd/conf.d/.gitkeep
  7. 0
      roles/ftp/templates/sql.conf
  8. 0
      roles/ftp/templates/tls.conf
  9. 0
      roles/ftp/templates/virtuals.conf

@ -1,8 +1,17 @@
---
- name: install proftpd
apt:
name: proftpd
state: present
update_cache: yes
- name: enable proftpd service
service:
name: proftpd
enabled: yes
- name: start proftpd service
service:
name: proftpd
state: started
# make `/mirror/root` dir
@ -12,20 +21,24 @@
# double check perms
# proftpd requires modules (how to install ?)
- name: Copy assets
- name: copy over config files
copy:
src: "{{ role_path }}/templates/proftpd.conf"
dest: /etc/proftpd/proftpd.conf
# owner: root
# group: root
# mode: "0755"
src: "{{ role_path }}/templates/{{ item.src }}"
dest: "/etc/proftpd/{{ item.dest }}"
owner: root
group: root
mode: "{{ item.mode }}"
loop:
- { src: blacklist.dat, dest: blacklist.dat, mode: "644" }
- { src: dhparams.pem, dest: dhparams.pem, mode: "644" }
- { src: ldap.conf, dest: ldap.conf, mode: "600" }
- { src: modules.conf, dest: modules.conf, mode: "644" }
- { src: proftpd.conf, dest: proftpd.conf, mode: "644" }
- { src: sql.conf, dest: sql.conf, mode: "600" }
- { src: tls.conf, dest: tls.conf, mode: "644" }
- { src: virtuals.conf, dest: virtuals.conf, mode: "644" }
# also need to get
# /etc/proftpd/blacklist.dat (binary)
# /etc/proftpd/dhparams.pem (maybe not)
# /etc/proftpd/ldap.conf (unable to read)
# /etc/proftpd/modules.conf (and maybe everything in /usr/lib/proftpd/)
# /etc/proftpd/sql.conf (unable to read)
# /etc/proftpd/tls.conf
# /etc/proftpd/virtuals.conf
- name: reload proftpd service
service:
name: proftpd
state: reloaded

Loading…
Cancel
Save