saltstack-formulas / nfs-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Apache License 2.0
18 stars 83 forks source link

simplify map.jinja #26

Closed aboe76 closed 6 years ago

aboe76 commented 6 years ago

fix issue with refactor an mappings.

aboe76 commented 6 years ago

@javierbertoli this will fix the mapping issues I introduced.

javierbertoli commented 6 years ago

Definitely simpler :smile:

Thanks, @aboe76

mioux commented 6 years ago

It's not working with debian server :

----------                
          ID: nfs-service 
    Function: service.running                       
        Name: nfs         
      Result: False       
     Comment: The named service nfs is not available                                                     
     Started: 18:55:19.104654                       
    Duration: 36.478 ms   
     Changes:     

The service is named nfs-server :smiley:

wwentland commented 6 years ago

I don't really like this change as it would result in various nested grains.filter_by calls for each grain that is being used. It's not inconceivable that one would like to incorporate settings based on, say, osmajorrelease or osrelease.

It also seems to drop the :lookup convention for overriding settings users don't typically want to set themselves and the change wouldn't be backward compatible.

By and large I like the earlier approach and would like to incorporate something similar in the template-formula. We might be able to cut it down, but just because a specific instance is shorter, doesn't mean that the general approach is better.