From 89b4408e0b91ee670bda0c6ea5a1f9d183e2504a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 30 Sep 2021 18:06:45 +0200 Subject: ftp: add role --- roles/ftp/tasks/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 roles/ftp/tasks/main.yml (limited to 'roles/ftp/tasks') 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 -- cgit v1.2.3