Is it possible to achieve the result of (hypothetical) include_pat_list
when using file.recurse? Or may be there is some other way to achieve the
For example: on the salt master server, I have, under the /srv/salt/files,
a directory full of scripts and their config files, I need to copy these
scripts to several 'production' servers. Scripts files should be copied
with the executable permissions set, and config files should be copied
wihtout executable permissions and with only read-write permissiond by the
file owner. Also, config files should be passed through the jinja template
engine, and script files should not. Notice that all these files are in a
the same single directory.
I was hoping that I could use file.recurse to do this, along the lines:
- file.recurse :
name : "/some/dir"
include_pat_list [ "script_1", "script_2", ... "script_N" ]
name : "/some/dir"
include_pat_list [ "config_1", "config_2", ... "config_N" ]
That is, the idea was that I could have two file.recurse statements, each
specifying a group of files, with attributes for these files, copying files
into the same destination directory.
Yes, I know that there is no 'include_pat_list', and that the 'include_pat'
allows only one pattern. That's not what I need.
I've achieved the desired result by using multiple 'file.managed'
statements, for each individual file, script and config. But now I have 10
'file.managed' statements in the .sls file, and it is quite possible that
this number will grow - where, logically, I should have only two
file.recurse specifications, defining two group of files.
So, is there a way to achieve this result without using 10 or more
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.