learn-ansible/hosts.yaml
2025-03-03 19:53:31 +01:00

33 lines
963 B
YAML

all:
vars:
ansible_host: "127.0.0.1"
ansible_ssh_user: "vagrant"
ansible_ssh_private_key_file: "/home/bronsen/.local/share/vagrant/insecure_private_keys/vagrant.key.rsa"
ansible_ssh_host_key_checking: false
ansible_ssh_common_args: "-o DSAAuthentication=yes -o IdentitiesOnly=yes -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostKeyAlgorithms=+ssh-rsa"
# hide all warnings regarding the discovered python interpreters on the remote side
# https://docs.ansible.com/ansible-core/2.18/reference_appendices/interpreter_discovery.html
ansible_python_interpreter: "auto_silent"
multi:
children:
application_servers:
database_servers:
application_servers:
hosts:
app1:
ansible_ssh_port: 2222
app2:
ansible_ssh_port: 2200
database_servers:
hosts:
db:
ansible_ssh_port: 2201
ansible_become_user: "postgres"
debian:
hosts:
deb:
ansible_host: 127.0.0.1
ansible_ssh_port: 2202