dnet-eagle: modified the playbook to support more than one ftp user. New virtualhost to access a specific directory.

This commit is contained in:
Andrea Dell'Amico 2016-03-02 19:59:02 +01:00
parent aa338d137b
commit 58d736a81f
4 changed files with 25 additions and 10 deletions

View File

@ -1,4 +1,5 @@
--- ---
vsftpd_server_enabled: True
vsftpd_anonymous_enable: "NO" vsftpd_anonymous_enable: "NO"
vsftpd_local_enable: "YES" vsftpd_local_enable: "YES"
vsftpd_write_enable: "YES" vsftpd_write_enable: "YES"
@ -11,6 +12,13 @@ vsftpd_pasv_min_port: 49152
vsftpd_pasv_max_port: 65534 vsftpd_pasv_max_port: 65534
vsftpd_chroot_list_enable: "YES" vsftpd_chroot_list_enable: "YES"
vsftpd_chroot_list_file: /etc/vsftpd.chroot_list vsftpd_chroot_list_file: /etc/vsftpd.chroot_list
vsftpd_iptables_rules: False vsftpd_chroot_passwd_enable: "NO"
vsftpd_chroot_local_user: "NO"
vsftpd_iptables_rules: True
vsftpd_iptables_allowed_hosts: vsftpd_iptables_allowed_hosts:
- 0.0.0.0/0 - 0.0.0.0/0
vsftpd_manage_user_acls: True
vsftpd_manage_real_users: False
vsftpd_manage_valid_shells: False

View File

@ -1,7 +1,4 @@
--- ---
- name: Start the vsftpd server
service: name=vsftpd state=started enabled=yes
- name: Stop the vsftpd server - name: Stop the vsftpd server
service: name=vsftpd state=stopped service: name=vsftpd state=stopped

View File

@ -1,14 +1,21 @@
--- ---
- name: Install the vsftpd package - name: Install the vsftpd package
apt: pkg=vsftpd state=installed apt: pkg=vsftpd state=installed
tags: tags: [ 'vsftpd', 'ftp' ]
- vsftpd
- ftp
- name: Install the vsftpd configuration file - name: Install the vsftpd configuration file
template: src=vsftpd.conf.j2 dest=/etc/vsftpd.conf mode=0444 owner=root group=root template: src=vsftpd.conf.j2 dest=/etc/vsftpd.conf mode=0444 owner=root group=root
notify: Restart the vsftpd server notify: Restart the vsftpd server
tags: tags: [ 'vsftpd', 'ftp' ]
- vsftpd
- ftp - name: Start and enable the vsftpd server
service: name=vsftpd state=started enabled=yes
when: vsftpd_server_enabled
tags: [ 'vsftpd', 'ftp' ]
- name: Stop and disable the vsftpd server
service: name=vsftpd state=stopped
when: not vsftpd_server_enabled
tags: [ 'vsftpd', 'ftp' ]

View File

@ -127,3 +127,6 @@ pasv_min_port={{ vsftpd_pasv_min_port }}
pasv_max_port={{ vsftpd_pasv_max_port }} pasv_max_port={{ vsftpd_pasv_max_port }}
chroot_list_enable={{ vsftpd_chroot_list_enable }} chroot_list_enable={{ vsftpd_chroot_list_enable }}
chroot_list_file={{ vsftpd_chroot_list_file }} chroot_list_file={{ vsftpd_chroot_list_file }}
passwd_chroot_enable={{ vsftpd_chroot_passwd_enable }}
chroot_local_user={{ vsftpd_chroot_local_user }}