Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

users.user_files does not work correctly when using gitfs backend #130

Open
johnccfm opened this issue Sep 8, 2016 · 0 comments
Open

users.user_files does not work correctly when using gitfs backend #130

johnccfm opened this issue Sep 8, 2016 · 0 comments

Comments

@johnccfm
Copy link

johnccfm commented Sep 8, 2016

In the users.user_files state there is this code to get a list of directories matching "/users/files/user/":-

{% set userfile_dirs = salt['cp.list_master_dirs'](prefix='users/files/user/') -%}

If no explicit source path is specified in the pillar will try to match 'users/files/user/' ~ username against this list. If it finds no match, it will skip the user completely.

The problem is that when using gitfs, cp.list_master_dirs only lists local directories on the master so there's a good chance your salt://users/files will not be in that list. This means that the state will always do nothing.

The workaround is to specify an explicit source for each user, e.g. salt://users/files/user/joeblogs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant