I found a formula for managing users on the saltstack-formulas github [1] and I'm having problems figuring out how to use it for managing user files within subdirectories. The pillar.example (see excerpt below) shows that by placing files in the appropriate directory they will be managed by salt and present in the given user's home directory. This all appears to work as expected. However I was hoping to be able to use this state to manage the contents of a directory within a user's home directory; specifically I wanted to populated ~/.bin with scripts. It does not appear that creating a salt://users/files/user/<username>/.bin directory will cause a ~/.bin directory (and the files therin) to be managed.
Am I correct in the limitations of this formula?
Does anyone have a sense of how hard this would be to implement and would you point me in the correct direction to modify the formula to manage arbitrary directories?
Can anyone suggest another approach to doing something similar?
Thanks
...
user_files:
enabled: True
# 'source' allows you to define an arbitrary directory to sync, useful to use for default files.
# should be a salt fileserver path either with or without 'salt://'
# if not present, it defaults to 'salt://users/files/user/<username>
source: users/files/default
template: jinja
# You can specify octal mode for files and symlinks that will be copied. Since version 2016.11.0
# it's possible to use 'keep' for file_mode, to preserve file original mode, thus you can save
# execution bit for example.
file_mode: keep
sym_mode: 640