Repository navigation
Changed IPs to Hostnames where possible, and removed host.present tes… - #369
setupminimal wants to merge 2 commits into
Conversation
|
Thanks for the PR! We actually have moved off Linode, and are using DNS instead of the hosts file for name resolution, so the |
|
Fixed. Thank you. |
|
LGTM, please squash these commits together. |
|
Actually, we should use a Salt I checked on the builders and this should be suitable for the contents of that file: Here are some docs on |
9c4679c to
a6ede2b
Compare
|
There. All tested, /etc/hosts is managed, all the extraneous stuff is gone, and it's all squashed into one commit. Is there anything else I should do? |
|
|
||
| /etc/hosts: | ||
| file.managed: | ||
| - contents: "127.0.0.1 localhost\n::1 localhost\n255.255.255.255 broadcasthost" |
There was a problem hiding this comment.
We should put these into a file and refer to them using source instead of contents. Please make a common/files directory, and put these into a file called hosts in that directory.
|
I have to go to bed, and a busy day tomorrow, so I will get back to you Thursday or Friday. Thank you for your help. |
| /etc/hosts: | ||
| file.managed: | ||
| - contents: "127.0.0.1 localhost\n::1 localhost\n255.255.255.255 broadcasthost" | ||
| - |
There was a problem hiding this comment.
Please also add user: root and mode: 644.
The group is variable and depends on the OS, so we need to use Jinja templating to set it up. It should be root on Ubuntu and wheel on OS X.
|
@setupminimal Any progress? Any questions? |
|
I have been banging my head on this for a while, interspersed with studying for finals, and I can't find the problem. I tried to put the /etc/hosts contents in a file, as you said, but then I haven't been able to refer to that file properly. Would you look at what I'm doing and tell me where I went wrong please? |
|
The way to refer to the file is adding this key/value pair to the For reference, here is the docs link again: https://docs.saltstack.com/en/2015.5/ref/states/all/salt.states.file.html#salt.states.file.managed. I'm not sure where you got the
Hopefully that helps; let me know if that's unclear. |
| - source: salt://{{ tpldir }}/ssh/{{ ssh_user }}.pub | ||
| {% endfor %} | ||
|
|
||
| hosts-file: |
There was a problem hiding this comment.
This can be /etc/hosts instead, and then the name parameter is unnecessary down below.
|
@setupminimal Sorry to leave this hanging, I didn't see you had updated this! This LGTM and should be good to go after a squash. |
| {% elif grains['os'] == 'Ubuntu' %} | ||
| - group: root | ||
| {% endif %} | ||
| - source: salt://{{ tlpdir }}/files/hosts |
There was a problem hiding this comment.
typo: Actually, this should be {{ tpldir }}.
|
Also please rebase against master when you squash. |
|
☔ The latest upstream changes (presumably #569) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Closing due to lack of response; these commits have been folded into #577. |
…ts from common/init.sls
This theoretically solves Issue #288. It certainly prevents /etc/hosts from being messed with, and the recommended testing in Vagrant returns all green. I'm still not entirely sure that I didn't miss something, just because I'm unfamiliar with saltfs's code, so I would appreciate some feedback.
This change is