aboutsummaryrefslogtreecommitdiff
path: root/roles/ftp/tasks/main.yml
blob: c3135ee1b4b77bf1c701ea5e543919d1e015f3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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