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

Domain customization generates bogus entry #26

Closed
lastmikoi opened this issue Feb 2, 2018 · 3 comments · Fixed by #30
Closed

Domain customization generates bogus entry #26

lastmikoi opened this issue Feb 2, 2018 · 3 comments · Fixed by #30
Labels

Comments

@lastmikoi
Copy link

Hello,

I'm a relatively new user of Salt and I've been working on a project that involves using this formula.
However, it would seem that the relatively recent domain part of the formula is not working properly in my environment:

OS: CentOS 7
Saltstack: 2016.11.8 with salt-ssh.

Indeed, it generates entries such as this one:

192.168.122.53     saltmaster saltmaster.<function caller at 0x7f4993c70aa0>

As you can see, it doesn't seem to be able to actually grab the domain and instead prints a reference to a function, which changes every run.

I've been trying to tinker a bit with the code and replacing salt.pillar.get with salt['pillar.get'] in https://github.com/saltstack-formulas/hostsfile-formula/blob/master/hostsfile/init.sls#L23 seems to do the trick.

If this workaround sounds reasonable I'll go ahead and open a PR with that modification but I am not familiar with best practices when it comes to making formulas so I'd rather get your input on that issue.

@cschneemann
Copy link

I had the same problem with salt-ssh and target centos 7.

Your change fixed it. Thanks

@myii
Copy link
Member

myii commented Nov 22, 2019

Thanks for confirming that, @cschneemann. Would you mind providing that PR, @lastmikoi?

@myii myii closed this as completed in #30 Apr 28, 2020
myii pushed a commit that referenced this issue Apr 28, 2020
* `<function caller at 0x7f4993c70aa0>` entries
* Fixes #26
saltstack-formulas-travis pushed a commit that referenced this issue Apr 28, 2020
## [0.8.1](v0.8.0...v0.8.1) (2020-04-28)

### Bug Fixes

* **init:** use `salt['pillar.get']` to avoid bogus entries ([ac98bb8](ac98bb8)), closes [#26](#26)

### Continuous Integration

* **gemfile.lock:** add to repo with updated `Gemfile` [skip ci] ([cc147ec](cc147ec))
* **kitchen:** avoid using bootstrap for `master` instances [skip ci] ([01ca5cc](01ca5cc))
@saltstack-formulas-travis

🎉 This issue has been resolved in version 0.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

4 participants