diff --git a/CHANGELOG b/CHANGELOG index a006293..3aa81d5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * base: deactivate insults in sudo * base: added handlers for entries in fstab * forwarding: added tags to distinguish IPv4 from IPv6 +* accounts: add a "users" tag so that new users are not created and customized password are not reset based on vars files when executing evolixisation.yml again ### Changed diff --git a/evolixisation.yml b/evolixisation.yml index ef840a0..d23375d 100644 --- a/evolixisation.yml +++ b/evolixisation.yml @@ -3,7 +3,7 @@ # First use : # ansible-playbook evolixisation.yml --ask-vault-pass -CDki hosts -u root -l HOSTNAME # Subsequent use : -# ansible-playbook evolixisation.yml --ask-vault-pass -CDKi hosts --skip-tags pf,generateldif-exec -l HOSTNAME +# ansible-playbook evolixisation.yml --ask-vault-pass -CDKi hosts --skip-tags pf,users,generateldif-exec -l HOSTNAME ## EXAMPLE OF PLAYBOOK - PLEASE USE YOUR OWN PLAYBOOK diff --git a/roles/accounts/tasks/main.yml b/roles/accounts/tasks/main.yml index f516165..e416cb9 100644 --- a/roles/accounts/tasks/main.yml +++ b/roles/accounts/tasks/main.yml @@ -23,6 +23,7 @@ tags: - accounts - admin + - users - name: "Verify AllowGroups directive" ansible.builtin.command: "grep -E '^AllowGroups' /etc/ssh/sshd_config" diff --git a/roles/accounts/tasks/user.yml b/roles/accounts/tasks/user.yml index 69d2035..5ddbc5e 100644 --- a/roles/accounts/tasks/user.yml +++ b/roles/accounts/tasks/user.yml @@ -8,6 +8,7 @@ tags: - accounts - admin + - users - name: "User '{{ user.name }}' is present" ansible.builtin.user: @@ -22,6 +23,7 @@ tags: - accounts - admin + - users - name: "Gather available local users for usage in check_mode" ansible.builtin.getent: @@ -29,6 +31,7 @@ tags: - accounts - admin + - users - name: "Home directory for '{{ user.name }}' is only accesible by owner" ansible.builtin.file: @@ -41,6 +44,7 @@ tags: - accounts - admin + - users - name: "SSH public keys for '{{ user.name }}' are present" ansible.posix.authorized_key: @@ -56,6 +60,7 @@ tags: - accounts - admin + - users - name: "Gather available local groups for usage in check_mode" ansible.builtin.getent: @@ -63,6 +68,7 @@ tags: - accounts - admin + - users - name: "Add {{ user.name }} to {{ evobsd_internal_group }}, {{ evobsd_ssh_group }}, {{ evobsd_sudo_group }} group" ansible.builtin.user: @@ -81,3 +87,4 @@ tags: - accounts - admin + - users