Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hosts file management #95

Open
hatifnatt opened this issue Feb 25, 2019 · 0 comments
Open

hosts file management #95

hatifnatt opened this issue Feb 25, 2019 · 0 comments

Comments

@hatifnatt
Copy link

Currently playbook will update hosts with line

127.0.1.1    {{ ansible_nodename }} {{ ansible_hostname }}

I assume it's expected that it will be expanded as

127.0.1.1   host.fqdn hostname

but ansible_nodename on Debian based OS will expand into hostname only not into fqdn, as result line in hosts will be like

127.0.1.1   hostname hostname

That is not expected behavior.

Also it's will be great to allow user completely skip hosts file management, it's not good pattern to manage config files with search and replace. I.e. variable can be added like rocket_chat_manage_hosts: true and in task check this var

- name: "Configure /etc/hosts"
  ...
  when:
    - ansible_virtualization_type != "docker"
    - rocket_chat_manage_hosts

I implemented these changes in my fork if they looks fine I will create PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant