I have a Vagrantfile with multiple boxes that runs a trigger script after the box is up’d. Is it possible to access configuration directives for things like hostname, user, port, and identityfile without having to shell out, actually run vagrant ssh-config, and then parse the resulting output?
For reference, here’s what the output looks like:
Host router1
HostName 127.0.0.1
User vagrant
Port 2200
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /home/user/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes