dev
Ansible provisioning, configuration management, and application-deployment toolAnsible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code.
Setup and configuration have been tested on the following operating systems:
- Ubuntu 20.04 (Focal Fossa), Rocky 8.4 (Green Obsidian)
- Ansible 2.9.6
Configuration files
Prerequisites
Prerequisites for Ansible.
Install Ansible
[email protected]:~$ sudo apt-get update && \
sudo apt-get -y upgrade && \
sudo apt-get install -y ansible
[email protected]:~$ sudo yum -y update && \
sudo yum -y upgrade && \
sudo yum install -y ansible
Server configuration
[servers]
server1 ansible_host=192.168.0.2
server2 ansible_host=192.168.0.3
server3 ansible_host=192.168.0.4
[all:vars]
ansible_python_interpreter=/usr/bin/python3
[servers]
server1 ansible_host=192.168.0.2
server2 ansible_host=192.168.0.3
server3 ansible_host=192.168.0.4
[email protected]:~$ ansible all -m ping -u ansible
[email protected]:~$ ansible all -m ping -u ansible
Output
server1 | SUCCESS => {
"changed": false,
"ping": "pong"
}
server2 | SUCCESS => {
"changed": false,
"ping": "pong"
}
server3 | SUCCESS => {
"changed": false,
"ping": "pong"
}
Firewall settings
The firewall being used is UFW (Uncomplicated Firewall). It is set by default to deny incoming traffic, allow outgoing traffic and allow port 22 (OpenSSH). Read more about UFW here.
UFW Settings
[email protected]:~$ sudo ufw default deny incoming
[email protected]:~$ sudo ufw default allow outgoing
[email protected]:~$ sudo ufw allow 22
[email protected]:~$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup