From d0f3edead88c07f6fa40d7eba83faeec6785ccce Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 16 Apr 2024 14:09:31 +0200 Subject: [PATCH 1/2] Make ansible a system account --- roles/user/tasks/user_ansible.yml | 1 + roles/user/vars/main.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/user/tasks/user_ansible.yml b/roles/user/tasks/user_ansible.yml index 57596de..4de152b 100644 --- a/roles/user/tasks/user_ansible.yml +++ b/roles/user/tasks/user_ansible.yml @@ -13,6 +13,7 @@ shell: '/bin/bash' group: 'ansible' state: "{{ l3d_users__ansible_user_state | ternary('present', 'absent') }}" + system: true password: "{{ l3d_users__ansible_user_password }}" create_home: true diff --git a/roles/user/vars/main.yml b/roles/user/vars/main.yml index 69d442b..e6a146a 100644 --- a/roles/user/vars/main.yml +++ b/roles/user/vars/main.yml @@ -1,3 +1,3 @@ --- -playbook_version_number: 13 +playbook_version_number: 14 playbook_version_path: 'l3d.users.user.version' From 152ffa23a07b82c6cc7edfbe8c5a836d99924b4a Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 16 Apr 2024 14:10:20 +0200 Subject: [PATCH 2/2] Cange user comment to username --- roles/user/tasks/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/user/tasks/users.yml b/roles/user/tasks/users.yml index c5c49be..6e76666 100644 --- a/roles/user/tasks/users.yml +++ b/roles/user/tasks/users.yml @@ -19,7 +19,7 @@ state: 'present' create_home: "{{ user.create_home | default(true) }}" home: "{{ user.home | default('/home/' + user.name) }}" - comment: "User created by ansible" + comment: "{{ user.name }}" shell: "{{ user.shell | default('/bin/bash') }}" password: "{{ user.password | default() }}" loop: "{{ _l3d_users__merged_users }}"