From 153d2870eea2d88f90ed49931700e15afb8efc45 Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 15 Jan 2023 12:52:55 +0100 Subject: [PATCH] feat: manage custom uid --- defaults/main.yml | 1 + tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 494f179..feaa7c5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,3 +9,4 @@ user_home: "/home/{{ user_name }}" user_shell: "/bin/bash" user_privatekey: [] user_autorized_key: [] +user_uid: diff --git a/tasks/main.yml b/tasks/main.yml index 7c19594..4bb76e0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,6 +10,7 @@ system: true password: "{{ user_password | default('') }}" groups: "{{ user_groups | join(',') }}" + uid: "{{ user_uid }}" home: "{{ user_home | default('/') }}" shell: "{{ user_shell | default('/usr/bin/nologin') }}" when: user_name != "root" and not user_ldap