saltstack-formulas / ntp-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
23 stars 158 forks source link

Fix for ntp to start without error: #32

Closed gwaters closed 8 years ago

gwaters commented 8 years ago

Had this error when using the ntp-formula: Comment: The following requisites were not found

Found that the ntp_conf_src was not being set because it was trying to do a pillar check. By default the formula should not require a pillar and should just work. I am just setting src file if a pillar doesn't exist.

gravyboat commented 8 years ago

This is a good catch, we should however be able to set a default variable in the event the pillar isn't found in the set option on line 9 I believe.

gwaters commented 8 years ago

comments cant take what i want to show you, one moment

gwaters commented 8 years ago

How about like that ?

gravyboat commented 8 years ago

I was thinking something like this:

{% set ntp_conf_src = salt['pillar.get']('ntp:ntp_conf', 'salt://ntp/ntp.conf') %}

which I believe should work. If you're still testing and want to give this a shot that would be awesome.

gwaters commented 8 years ago

Seems to work, updated the PR. Thanks for the input @gravyboat

gravyboat commented 8 years ago

No problem, thanks for testing things out!