saltstack-formulas / samba-formula

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

Ubuntu samba service name is smbd #4

Closed darless closed 10 years ago

darless commented 10 years ago

On Ubuntu samba's service name should be smbd and not samba. I see that in Debian its suppose to be samba. When I switch the Debian's service name in map.jinja to smbd it works just fine on my box.

I am using Ubuntu 12.04.3 LTS.

salt 'samba' grains.items: ... os: Ubuntu os_family: Debian ...

So grains.filter_by defaults to using the grain os_family. The solution would be to then try to match on the grain="os". I just don't know the appropriate way to do that yet.

whiteinge commented 10 years ago

Gah! Well, that's an annoying discrepancy. The syntax to change the grain filter_by uses is something like this:

{% set samba = salt['grains.filter_by']({
...
}, grain='os', merge=salt['pillar.get']('samba:lookup')) %}
kennydo commented 10 years ago

7 fixed this, but #6 broke it again, so I made #8.

It should work for Debian and Ubuntu now.

whiteinge commented 10 years ago

Ah, right. Thanks for staying on top of this.

darless commented 10 years ago

Awesome! Just pulled the latest and tested on my Ubuntu minion and it works!