createprocess - SaltStack: Use directory as source only if it exists -
I would like to know if there is a way to run a sultstacks situation, if the directory source is defined in a master source
Actually, I want to allow users to put some configuration files in their I What do I want to do now As of now, I have the following: ['User']%} {{username}} in the column for the user name: user: - current - home: / home / {{user name} }}. . . ] # (Yadda, yadda, yadda) #toDo: If the user's directory # is not present then is there any way to run it? / Home / {{username}}: file.recurse: - User: {{username}} - group: ubuntu - source: - salt: // user / {{username}} - required: - User: { {User name}} {% Endfor%} What do I do, what happens in the code like I have a "itemprop =" text "> for the column Try the user name HOME directory, most users will not have special, but some of them (a custom < code> .vimrc , for example)
ToDo is: If a directory is < Code> salt: // user in the salt tree (or salt master) / {{username}} , then
as the source of file.recurse with that directory
file .recurse Adit in . Otherwise, leave that condition and experiment with any default content of
$ HOME when a user is created (just not anything, I mean).
only IIF section
file.recurse configuration (like
- onlyif: test -e salt: // users / {{username} }} will help ... but nope ... i also tried to create an empty directory in
salt: // user / empty_error / and pass it as default Given (as shown here), but in that move
{%} [user ']%} {{url} User name}}: user: - current - home: / home / {{username}} [...] # (yadda, yadda, yadda) # nb !!!! probable poet bottanake {% if 'user /' The username is not in salt ['cp.list_master_dirs'] (prefix = 'user')%} / home / {{username}}: file.recurse: - user: {user name}} - group: ubuntu - Source: - salt: // user / {{username}} - is required: - User: {{username}} {% endif%} {% endfor%}
Comments
Post a Comment