ansible 配置

noteId: WEB1b0a68b57e9257038e3ee219cff4d122 · 原始路径:/ALL/Linux - A模块/服务配置/FTP - TCP 21、TCP 990/vsftpd/ansible 配置.note

1、ansible 配置 chroot list,并设置用户例外:

附件:

vsftpd

---- name: chroot  hosts: all  gather_facts: false  tasks:     - name: Install The packet      apt:        name: vsftpd        update_cache: false    - name: Configure Ftp config file      copy:        src: /etc/ansible/data/vsftpd.conf        dest: /etc/      notify: restart    - name: Create chroot list file      file:        path: /etc/vsftpd.chroot_list      changed_when: false      notify: restart    - name: Set list user      lineinfile:        path: /etc/vsftpd.chroot_list        line: skills      notify: restart  handlers:    - name: restart      systemd:        name: vsftpd        state: restarted