[hosts] make connecting via ssh work
ssh needed - to allow RSA - pointing to the private key from vagrant - telling of correct port number Values were copied from `vagrant ssh-config` and applied to the appropriate level in hosts.ini
This commit is contained in:
parent
01a3d66c52
commit
6520fda601
1 changed files with 19 additions and 14 deletions
33
hosts.ini
33
hosts.ini
|
@ -1,18 +1,23 @@
|
||||||
# Application servers
|
# Group named "multi"
|
||||||
[app]
|
|
||||||
192.168.60.4
|
|
||||||
192.168.60.5
|
|
||||||
|
|
||||||
# Database server
|
|
||||||
[db]
|
|
||||||
192.168.60.6
|
|
||||||
|
|
||||||
# Group named "multi" with all servers
|
|
||||||
[multi:children]
|
[multi:children]
|
||||||
app
|
appplication_servers
|
||||||
db
|
database_servers
|
||||||
|
|
||||||
# Variables that will be applied to all servers
|
# Variables that will be applied to all servers
|
||||||
[multi:vars]
|
[multi:vars]
|
||||||
ansible_user=vagrant
|
ansible_host = 127.0.0.1
|
||||||
; ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
|
|
||||||
|
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
|
||||||
|
|
||||||
|
; https://docs.ansible.com/ansible-core/2.18/reference_appendices/interpreter_discovery.html
|
||||||
|
ansible_python_interpreter = auto_silent
|
||||||
|
|
||||||
|
[appplication_servers]
|
||||||
|
app1 ansible_ssh_port=2222
|
||||||
|
app2 ansible_ssh_port=2200
|
||||||
|
|
||||||
|
[database_servers]
|
||||||
|
db ansible_ssh_port=2201
|
||||||
|
|
Loading…
Add table
Reference in a new issue