neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
11 stars 14 forks source link

Simple way to add hosts into /etc/hosts file #57

Closed pvoborni closed 3 years ago

pvoborni commented 3 years ago

This is useful for cases where the fake hostname needs to be used e.g. when accessing FreeIPA Web UI which is sensitive on used hostname.

It is uncomfortable task to read the values from mrack list and add them manualy to /etc/hosts.

The change introduces two commands to help with this case:

Mrack adds two markers into the /etc/hosts file and adds records between them. This should work also with multiple runs of mrack in separate tests. If the section already contains the fake hostname then this line is overwritten with a new value. This is useful when provisioning hosts for the same task after they were previously removed.

Signed-off-by: Petr Vobornik pvoborni@redhat.com

pvoborni commented 3 years ago

Is it possible that you could divide this work into two commits for feature and tests?

I don't see an added value of the task to spend time on it. Tests are part of the change and this is not e.g. FreeIPA where there were are valid reasons - easier backporting of only tests.

Tiboris commented 3 years ago

We need rebase here.