Ansible

Modified

June 10, 2024

Installation

  1. Create an Ansible Project
mkdir test_ansible && cd test_ansible
  1. Create a Python Virtual Environment
  2. Install Ansible with pip
$ python3 -m pip install ansible

Commands

CLI

Run a playbook with an inventory file

ansible proxmox -m ping -i inventory

Playbooks

Run playbook playbook.yaml with inventory inventory.yaml:

ansible-playbook playbook.yaml -i inventory.yaml

Configuration

Get default config file and store in the working directory of an ansible project:

ansible-config init --disabled -t all > ansible.cfg
Back to top