diff --git a/README.md b/README.md index 86f4e3b..c151547 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,13 @@ Can be 'RELEASE.2019-06-27T21-13-50Z' for instance. ```yaml minio_user: minio minio_group: minio +minio_usergroup_manage: true ``` -Name and group of the user running the minio server. -**NB**: This role automatically creates the minio user and/or group if these does not exist in the system. +Name and group of the user running the minio server. Without explicitly +disabling `minio_usergroup_manage: false` this role will create/update this +user and group. The created/updated user will be installed/updated as a system +user. ```yaml minio_server_envfile: /etc/default/minio diff --git a/defaults/main.yml b/defaults/main.yml index 60a753f..cc7783f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,6 +11,7 @@ minio_client_release: "" # Runtime user and group for the Minio server service minio_user: minio minio_group: minio +minio_usergroup_manage: true # Path to the file containing the ENV variables for the Minio server minio_server_envfile: /etc/default/minio diff --git a/tasks/install-server.yml b/tasks/install-server.yml index 6214efa..eba1052 100644 --- a/tasks/install-server.yml +++ b/tasks/install-server.yml @@ -21,13 +21,16 @@ group: name: "{{ minio_group }}" state: present + when: minio_usergroup_manage|bool - name: Create Minio user user: name: "{{ minio_user }}" group: "{{ minio_group }}" system: "yes" + create_home: no shell: "/usr/sbin/nologin" + when: minio_usergroup_manage|bool - name: Create the Minio data storage directories file: