Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Jinja template in the perl script
- my $api_user = "{{ salt['pillar.get']('api_user') }}";
- # State file
- api.pl:
- file.managed:
- - name: /usr/local/bin/api.pl
- - source: salt://files/usr/local/bin/api.pl
- - template: jinja
- # Pillar file
- api_user:
- - username
- # End result in the script
- my $api_user = "['username']";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement