You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
I'd like to get the value of vagrant_machine_name while in the VM. Since I don't know what it may be for a given vm, I do not the path of the config.yml file (which I would otherwise parse for the value). I also cannot use hostname given the variability of domain name structure.
Is there an environmental variable or other means to determine this and other such ansible configuration values from within the VM?
The text was updated successfully, but these errors were encountered:
The root folder should always be mounted at /vagrant by default.
You could add a shell provisioner in a Vagrantfile.local or overriding Vagrantfile that runs inside the guest and stores the machine name in a file somewhere (see this answer).
IIRC, the hostname (determined by running hostname in the VM) should be the machine name...
I'd like to get the value of vagrant_machine_name while in the VM. Since I don't know what it may be for a given vm, I do not the path of the config.yml file (which I would otherwise parse for the value). I also cannot use
hostname
given the variability of domain name structure.Is there an environmental variable or other means to determine this and other such ansible configuration values from within the VM?
The text was updated successfully, but these errors were encountered: