Skip to content

Automatic /etc/hosts entry for created machine #261

@gdubicki

Description

@gdubicki

I am testing some Ansible playbooks on the machine in GCP created with Vagrant and this plugin.

I am using static Ansible inventory, so after I create a new vm I have to add/update its external IP address in the inventory file.
This is slightly annoying.

I could automate it by using the GCP dynamic inventory for Ansible but a) its configuration is an overkill for such a simple use case, b) it would add another extra step to regenerate the inventory after creating a new vm.

For my use case it would be cool if this plugin could create/update an /etc/hosts entry with the created vm external IP under some name, f.e. by default "vagrant".

Do you think this is a good idea?
Would a PR with such an optional feature be accepted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions