From d529c80826e62485ba420292f5f046b19c9c0e56 Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 24 Apr 2024 21:59:14 +0200 Subject: [PATCH] Adding comment to user --- README.md | 4 ++-- galaxy.yml | 2 +- roles/user/README.md | 1 + roles/user/tasks/users.yml | 2 +- roles/user/vars/main.yml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6a661e2..e71286f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ And it is also possible to delete users. ## Using this Collection You can install the collection using ansible-galaxy by running: ```bash -ansible-galaxy collection install l3d.users:1.1.1 +ansible-galaxy collection install l3d.users:1.1.2 ``` Remember you can to Upgrade to the latest version of the l3d.git collection using the ``--upgrade`` parameter: @@ -45,7 +45,7 @@ You can also list a collection in ``requirements.yml``: --- collections: - name: l3d.users - version: ">=1.1.1" + version: ">=1.1.2" ``` Global Variables: diff --git a/galaxy.yml b/galaxy.yml index d053c1b..26abcb7 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,7 +9,7 @@ namespace: l3d name: users # The version of the collection. Must be compatible with semantic versioning -version: 1.1.1 +version: 1.1.2 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/roles/user/README.md b/roles/user/README.md index 3ae1f95..5032510 100644 --- a/roles/user/README.md +++ b/roles/user/README.md @@ -18,6 +18,7 @@ The Option of these directory-variables are the following. | option | values | required | description | | ------ | ------ | --- | --- | | ``name`` | *string* | ``required`` | The user you want to create | +| ``comment`` | *Full Name* | - | Optionally add Full Name | | ``state`` | ``present`` | - | Create or delete user | | ``shell`` | ``/bin/bash`` | - | The Shell of the User | | ``create_home`` | ``true`` | - | create a user home *(needed to store ssh keys)* | diff --git a/roles/user/tasks/users.yml b/roles/user/tasks/users.yml index 6e76666..72cac61 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.name }}" + comment: "{{ user.comment | default(user.name) }}" shell: "{{ user.shell | default('/bin/bash') }}" password: "{{ user.password | default() }}" loop: "{{ _l3d_users__merged_users }}" diff --git a/roles/user/vars/main.yml b/roles/user/vars/main.yml index e6a146a..a88d953 100644 --- a/roles/user/vars/main.yml +++ b/roles/user/vars/main.yml @@ -1,3 +1,3 @@ --- -playbook_version_number: 14 +playbook_version_number: 15 playbook_version_path: 'l3d.users.user.version'