saltstack-formulas / users-formula

Configure users via pillar
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
99 stars 360 forks source link

createhome doesn't work when the home folder doesn't exist #181

Closed arthurzenika closed 6 years ago

arthurzenika commented 6 years ago

For a user

users:
  bob:
    home: /var/home/bob/
    createhome: True

The users state fails because useradd can't add a home in /var/home/bob since /var/home doesn't exist.

The file.directory depends on the user to exist. We have a sort of chicken and egg problem.

arthurzenika commented 6 years ago

I have a patch coming using prereq to solve this problem.