From 6520fda601e5adfb746d40e4055696a0f4ed0d74 Mon Sep 17 00:00:00 2001
From: bronsen <kontakt+gitcommit@nrrd.de>
Date: Fri, 28 Feb 2025 10:22:12 +0100
Subject: [PATCH] [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
---
 hosts.ini | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/hosts.ini b/hosts.ini
index 126091a..201caa4 100644
--- a/hosts.ini
+++ b/hosts.ini
@@ -1,18 +1,23 @@
-# Application servers
-[app]
-192.168.60.4
-192.168.60.5
-
-# Database server
-[db]
-192.168.60.6
-
-# Group named "multi" with all servers
+# Group named "multi"
 [multi:children]
-app
-db
+appplication_servers
+database_servers
 
 # Variables that will be applied to all servers
 [multi:vars]
-ansible_user=vagrant
-; ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
+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
+
+; 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