aboutsummaryrefslogtreecommitdiff
path: root/roles/ftp/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ftp/tasks')
-rw-r--r--roles/ftp/tasks/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/ftp/tasks/main.yml b/roles/ftp/tasks/main.yml
new file mode 100644
index 0000000..c3135ee
--- /dev/null
+++ b/roles/ftp/tasks/main.yml
@@ -0,0 +1,36 @@
+---
+- name: Install FTP
+ apt:
+ name:
+ - pure-ftpd-ldap
+ become: yes
+
+- name: Install Config
+ template:
+ src: pure-ftpd.conf.j2
+ dest: /etc/pure-ftpd/pure-ftpd.conf
+ become: yes
+ notify: restart
+
+- name: Install Config
+ template:
+ src: ldap.conf.j2
+ dest: /etc/pure-ftpd/db/ldap.conf
+ mode: '0600'
+ when: ftp.ldap.enable
+ become: yes
+ notify: restart
+
+- name: Remove original systemd unit
+ systemd:
+ name: pure-ftpd-ldap.service
+ state: stopped
+ enabled: no
+ become: yes
+
+- name: Install custom unit file
+ copy:
+ src: pure-ftpd-custom.service
+ dest: /etc/systemd/system/pure-ftpd-custom.service
+ become: yes
+ notify: restart