Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # Jinja template in the perl script
  2. my $api_user = "{{ salt['pillar.get']('api_user') }}";
  3.  
  4. # State file
  5. api.pl:
  6. file.managed:
  7. - name: /usr/local/bin/api.pl
  8. - source: salt://files/usr/local/bin/api.pl
  9. - template: jinja
  10.  
  11. # Pillar file
  12. api_user:
  13. - username
  14.  
  15. # End result in the script
  16. my $api_user = "['username']";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement