Ansible
Installation
- Create an Ansible Project
mkdir test_ansible && cd test_ansible
- Create a Python Virtual Environment
- 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