ansible
This is an old revision of the document!
Table of Contents
Ansible
Installing
RHEL has ansible-core, podman, and ansible-navigator in the OS repositories.
Ubuntu needs a PPA:
sudo add-apt-repository --yes --update ppa:ansible/ansible sudo apt install ansible -y
It can also be installed with Python
sudo apt install python3-pip -y pip3 install ansible
Inventory and Config
The config is read from: ANSIBLE_CONFIG, ./ansible.cfg, ~/ansible.cfg, /etc/ansible/ansible.cfg
[defaults] inventory = ./ansible_hosts # relative to path of ansible.cfg nocows = True interpreter_python = /usr/bin/python3 gathering = False forks = 2 strategy = free host_key_checking = False [ssh_connection] pipelining = True ssh_args = -o ControlMaster=auto -o ControlPersist=60s
The default inventory path is /etc/ansible/hosts
genpurpose1host.localdomain # ungrouped [web] webserver1 ansible_connection=ssh ansible_host=webserver1.localdomain ansible_port=2022 ansible_user=webadmin localhost ansible_connection=local
ansible.1772361468.txt.gz · Last modified: by reddy
