feat: Extract user account from common #97
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As requested by @jocelynj, extracting account creation from
common
to create new accounts simpler.The following changes had been made:
users
creation into a new roleusers
;accounts.yml
to create a user (the playbookcommon.yml
behaves in the same way as before);group_vars
with a dictionary of every user;The following regressions are:
Breaking change: The shell
/bin/bash
is not set up during the first creation.The removed complex logic to check if an account exists is necessary for this fact, as the
shell
is not set up any more.In fact, the
ansible.builtin.user
Ansible module overrides any value changed by the user, and provides no way to leave it untouched.Since every machine is running on Debian, the shell is in any case
/bin/bash
by default.Duplicating
.gitconfig
and.vimrc
,files
.The
roles/users/files
location is the expected location for these files.However, there are still tasks (
shared/project-account.yml
androles/common/tasks/ssh-tunnel.yml
) that seem redundant with this newusers
role, but I need some guidance before making any changes.As this is my first PR on the project, feel free to tell me if I need to change anything.