Adding FTP server

This commit is contained in:
VC
2024-07-05 11:53:07 +02:00
parent 949c9bbb13
commit 9fc3efae7f
8 changed files with 68 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
listen=NO
listen_ipv6=YES
anonymous_enable=YES
local_enable=NO
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
utf8_filesystem=YES
no_anon_password=YES
anon_root=/srv/ftp
pasv_enable=YES
pasv_min_port=10100
pasv_max_port=10110

View File

@@ -0,0 +1,4 @@
- name: restart vsftpd
service:
name: vsftpd
state: restarted

25
roles/ftp/tasks/main.yml Normal file
View File

@@ -0,0 +1,25 @@
- name: Install vsftpd
package:
name: vsftpd
state: present
- name: Create ftp directory
file:
path: /srv/ftp
state: directory
- name: Create upload directory
file:
path: /srv/ftp/upload
owner: ftp
group: root
state: directory
- name: Config vsftpd
copy:
src: files/vsftpd.conf
dest: /etc/vsftpd.conf
owner: root
group: root
notify: restart vsftpd