2025-03-20 19:59:48 -04:00

28 lines
610 B
YAML

---
- name: Setup FTP server on Ubuntu
hosts: all
become: true
tasks:
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
- name: Install proftpd package
ansible.builtin.apt:
name: proftpd
state: present
- name: Ensure proftpd is enabled and started
ansible.builtin.service:
name: proftpd
state: started
enabled: true
become: true
- name: Allow FTP through UFW firewall (if UFW is enabled)
ansible.builtin.ufw:
rule: allow
port: 21
proto: tcp
ignore_errors: false