diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-30 18:06:45 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-30 18:06:45 +0200 |
commit | 89b4408e0b91ee670bda0c6ea5a1f9d183e2504a (patch) | |
tree | e72b217a769708ab8a3f678ac93a7b58d3330125 /roles/ftp/tasks | |
parent | ac9d4a9a0150f525c2ac5b4105bc0c11a24d8e38 (diff) | |
download | ansible_collection-89b4408e0b91ee670bda0c6ea5a1f9d183e2504a.tar.gz |
ftp: add role
Diffstat (limited to 'roles/ftp/tasks')
-rw-r--r-- | roles/ftp/tasks/main.yml | 36 |
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 |