Feat: add ftp
This commit is contained in:
parent
b365759be6
commit
c6eab7b09a
11
files/vsftpd.conf.j2
Normal file
11
files/vsftpd.conf.j2
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
listen=YES
|
||||||
|
listen_ipv6=NO
|
||||||
|
|
||||||
|
anonymous_enable=NO
|
||||||
|
local_enable=YES
|
||||||
|
write_enable=YES
|
||||||
|
chroot_local_user=YES
|
||||||
|
allow_writeable_chroot=YES
|
||||||
|
secure_chroot_dir=/var/run/vsftpd/empty
|
||||||
|
|
||||||
|
pam_service_name=vsftpd
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: tasks/lamp.yml
|
- include: tasks/lamp.yml
|
||||||
|
- include: tasks/ftp.yml
|
||||||
- include: tasks/accounts.yml
|
- include: tasks/accounts.yml
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
@ -26,3 +27,8 @@
|
|||||||
service:
|
service:
|
||||||
name: apache2
|
name: apache2
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: Reload vsftpd
|
||||||
|
service:
|
||||||
|
name: vsftpd
|
||||||
|
state: reload
|
||||||
|
19
tasks/ftp.yml
Normal file
19
tasks/ftp.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
- name: Install vsftpd Packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: latest
|
||||||
|
loop:
|
||||||
|
- 'vsftpd'
|
||||||
|
|
||||||
|
- name: Set up vsftpd conf
|
||||||
|
template:
|
||||||
|
src: "files/vsftpd.conf.j2"
|
||||||
|
dest: "/etc/vsftpd.conf"
|
||||||
|
notify: Reload vsftpd
|
||||||
|
|
||||||
|
- name: Start vsftpd service
|
||||||
|
service:
|
||||||
|
name: vsftpd
|
||||||
|
enabled: true
|
||||||
|
state: started
|
Loading…
Reference in New Issue
Block a user