VSFTPD

Votre fichier

---
- name: ftp server install
hosts: localhost
gather_facts: no
become: yes
vars_files:
- users.yml
tasks:
- name: latest vsftpd version
yum:
name: vsftpd
state: latest
- name: latest firewalld version
yum:
name: firewalld
state: latest
- name: vsftpd
service:
name: vsftpd
enabled: true
state: started
- name: firewalld
service:
name: firewalld
enabled: true
state: started
- name: firewalld allows ftp
firewalld:
permanent: yes
immediate: yes
state: enabled
- name: Create_FTP_users
user:
password: "{{ item.password | password_hash('sha512') }}"
with_items: "{{ ftp_users }}"

Le bon fichier

---
- name: ftp server install
hosts: localhost
gather_facts: no
become: yes
vars_files:
- users.yml
tasks:
- name: latest vsftpd version
yum:
name: vsftpd
state: latest
- name: latest firewalld version
yum:
name: firewalld
state: latest
- name: vsftpd
service:
name: vsftpd
enabled: true
state: started
- name: firewalld
service:
name: firewalld
enabled: true
state: started
- name: firewalld allows ftp
firewalld:
permanent: yes
immediate: yes
state: enabled
- name: Create_FTP_users
user:
name: "{{ item.username }}"
password: "{{ item.password | password_hash('sha512') }}"
with_items: "{{ ftp_users }}"