Ansible

Ansible is an automation language that can perfectly describe an IT application infrastructure. It’s easy to learn and doesn’t require a grad-level computer science degree to read. Automation shouldn’t be more complex than the tasks it’s replacing.

Installing Ansible

  • sudo apt update
  • sudo apt install ansible

Project folder structure

  • AnsibleProject
    • ansible.cfg
    • hosts
    • playbook.yml
    • roles
      • basic
        • tasks
          • main.yml

Configuring Ansible

List the IP address of the host systems in the hosts file

Run Ansible

Run the following command from your project directory

  • ansible-playbook -K playbook.yml