-
Notifications
You must be signed in to change notification settings - Fork 33
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
Disable creation of root user #46
Comments
Hi, I added a check so that the |
That's not a great fix, because it also ignore configuring the root home directory. Also, if you don't want to manage the |
Hi @j8r, I agree that this is not an optimal solution. Not listing the root user in the users list is not an option, when this list does also feed other playbooks. I submitted a PR that enables to choose whether the user and / or home should be created on a per user basis: #47 In the discussion of the PR I also provided a use case where another role references the users variable to setup additional things. |
Agree @apiening , your PR is exactly what I would done. That's indeed a not uncommon practice to modify the |
I agree with above, I'm also managing some of the root dotfiles for the same reason. |
Since this seems to be a wanted feature, let's take another look. |
Would 038d8c0 work for you all? You would need to define some variables for the root user though in order to work: - hosts: all
become: yes
roles:
- weareinteractive.users
vars:
users:
- username: root
# don't create the user
user_create: no
# define root's home directory
home: /root
# override group in case you used users_group
group: root |
@franklinkim Yes, but to make it works it also means to revert 55d3c48 There are other options, but this one is the simplest and most flexible implementation (e.g. one may want to change the root's password or SSH keys.) |
@franklinkim Thank you very much for reconsidering this. |
Ok for me too, thanks @franklinkim, that's a great little change 👍 |
I have the root user in my users: variable and weareinteractive.users fails for obvious reasons:
Is there an option to disable the creation of a specific user?
The text was updated successfully, but these errors were encountered: