Advertisement
Guest User

Unicode string while grabbing grain

a guest
Oct 17th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. {% set microcode = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'pkgs': ['intel-microcode', 'amd64-microcode'],
  4. },
  5. 'RedHat': {
  6. 'pkgs': ['microcode_ctl'],
  7. 'service': 'microcode',
  8. },
  9. 'FreeBSD': {
  10. 'pkgs': ['devcpu-data'],
  11. 'sources': [{'devcpu-data': 'http://www.somesite.com/o1/fbsd/' ~ grains.get('osmajorrelease', '') ~ '/devcpu-data-1.7.txz'}],
  12. 'service': 'microcode_update',
  13. },
  14. }, grain='os_family') %}
  15.  
  16. The sources for FreeBSD comes out as:
  17.  
  18. {'devcpu-data': u'http://blahblah.com/devcpu-data-1.7.txz'}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement