Hi,
I have the following folder structure in my pillar
pillar:
cut:
my_test:
init.sls
dev:
my_test:
init.sls
and i want to use in my state variables from the both (cut a dev) environments.
Something like:
create_file:
file.managed:
- name: [salt['pillar.get']([saltenv, 'my_test', 'path']|join(':')), 'file_name']|join('/')
- defaults: salt['pillar.get']([saltenv, 'my_test', 'var']|join(':'))
The first saltenv is dev, the second saltenv is cut.
As a result I expect a file in /app/dev/file_name with values from cut pillar
Is it possible to do? Is it possible assign environment names dynamically?