ansible.cfg)This file specifies the default settings for Ansible:
[defaults]
inventory = ./inventory
[privilege_escalation]
become = true
become_method = sudo
become_user = root
become_ask_pass = false
ftp.yml)This playbook includes various tasks for setting up an FTP server using vsftpd:
vsftpd.vsftpd settings.vsftpd service.inventory)Contains the server group and variables:
[server:vars]
ansible_ssh_private_key_file=/home/abc.pem
[server]
#Server_Live_IP
#1.1.1.1
#Server_Live_IP with your server's IP address.ansible_ssh_private_key_file with the path to your PEM file (e.g., /home/your_key.pem).Run the following command in the directory containing your playbook:
ansible-playbook ftp.yml
This command will execute the ftp.yml playbook, which performs a series of tasks to set up an FTP server on the specified CentOS host.
user1 and user2) will be created for FTP access.