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

Directory permissions not set recursively #409

Open
maunzCache opened this issue Sep 24, 2020 · 0 comments
Open

Directory permissions not set recursively #409

maunzCache opened this issue Sep 24, 2020 · 0 comments

Comments

@maunzCache
Copy link

My coworker noticed a special case when reusing a consul installation done by this role, which we would like to be fixed/supported.

Imagine the following setup:

  • Existing consul installation on /opt/ partition on host
  • Unmount /opt/
  • Reset OS and apply basic configuration via ansible
  • (Re)Mount /opt/
  • Run this role

Consul startup will now file due to missing permissions.

What happened is that the previous existing "consul" user used for the installation has now a new uid on a unix system which is not compatible with the "old" one on the mounted /opt partition. This is usually fixed by renewing file permissions which this role does in dirs.yml i think. The very first file task does set file permissions but not recursively. Thus the directories have fixed user and group ids but not the files or subdirectories of consul.

The proposed fix is to add the "recurse: yes" parameter for all directory related permission tasks.

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