Hi Mailing List,
I would like to iterate through a list of files on my local server. That is because I have a tool that has about 15 config files that all need the same file settings, are templates and so on. I'm using "local" salt, so as in file_client: local, and also a changed file_roots as I have multiple file roots.
When I run cp.list_master on the command line, it works like a charm:
root@mail /srv/salt # salt-call cp.list_master saltenv=mailserver prefix=dovecot/templates
local:
- dovecot/templates/users
- dovecot/templates/dovecot.conf
[...]
In a state:
foobar:
cmd.run:
- name: echo {{ salt['cp.list_master']('saltenv=mailserver', 'prefix=dovecot/templates') }}
It gives me:
local:
----------
ID: foobar
Function: cmd.run
Name: echo []
Result: True
Comment: Command "echo []" run
Changes:
----------
pid:
3426
retcode:
0
stderr:
stdout:
[]
I cant really find my error.. Do any of you have a hint?