diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-11-08 09:32:29 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-11-08 09:44:36 +0200 |
commit | 0467496724b8875a5ba5fa95d07740aa51f6c780 (patch) | |
tree | 21a218b35165a3a6025cc56e5f4ee93d8c3706fd /roles/unix_users/subplot.md | |
parent | edac7f326c8138d7377d595a3cf26f7f3d36b0fb (diff) | |
download | debian-ansible-0467496724b8875a5ba5fa95d07740aa51f6c780.tar.gz |
feat(unix_users): allow a user to be added to extra groups
Diffstat (limited to 'roles/unix_users/subplot.md')
-rw-r--r-- | roles/unix_users/subplot.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/unix_users/subplot.md b/roles/unix_users/subplot.md index 2fde3e7..c7929e9 100644 --- a/roles/unix_users/subplot.md +++ b/roles/unix_users/subplot.md @@ -24,6 +24,8 @@ This role makes use of the following variables: * `authorized_keys` – OPTIONAL: text of contents of `~/.ssh/authorized_keys` * `password` – OPTIONAL: encrypted password + * `groups` – OPTIONAL: list of additional groups to which user + should be added Create the encrypted password with something like: @@ -43,10 +45,11 @@ then the host has user foo and the user foo on host has encrypted password foopass and the user foo on host has shell /bin/true and the user foo on host has authorized_keys containing "ssh-rsa" +and the user foo on host is in group operator ~~~ ~~~{#foo.yml .file .yaml} -unix_users_version: 1 +unix_users_version: 2 unix_users: - username: foo @@ -55,4 +58,5 @@ unix_users: password: foopass authorized_keys: | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKVaQfxzzwpwk763IcPBs308TpYYp6+NTOMvYaj3j3ewz8feYQg3lOlKo/5xaPug2ZywG6v6tpn/p0drovT5YAIPJitP7yJAfEzJe/gO7c9uwx0uIpe6cc8bwRG0XFdUVK0EneB6LpIec+3juj4zitGBm0ffIoLDhJ7J0daTzQN62rZaw/2SjSvgbfnu3a2BYRPz1NGiXdvOCbytVSLlUAR6SxNPrFdh/BJnS4umyDaBL/1j2yaw/WlkfZPn5Ni3USZLRcbHnBUUbo64iwBwJabhdpeh0xLGTqDkaeudUgZjlrRHFyCbwJTPtDzJsPLb5HKGGzdXPHP7Lk6PM2CIOz liw@exolobe1 + groups: [operator] ~~~ |