Skip to content

Commit 864fa99

Browse files
committed
ssh_keys: add role argument specifications
Signed-off-by: Norman Ziegner <n.ziegner@hzdr.de>
1 parent 30f910f commit 864fa99

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-FileCopyrightText: Helmholtz-Zentrum Dresden-Rossendorf (HZDR)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
---
6+
argument_specs:
7+
main:
8+
short_description: "Add provided authorized SSH public keys to a user."
9+
description:
10+
- "This Ansible role distributes authorized SSH public keys to users."
11+
- "It can optionally create user accounts and manages authorized_keys files."
12+
author:
13+
- "HIFIS Software Services"
14+
options:
15+
ssh_user_list:
16+
description:
17+
- "List of users with their SSH public keys to be authorized."
18+
- "Each list entry corresponds to one user account."
19+
- "Each entry must contain the 'name' of the user and a list of 'authorized_keys'."
20+
- "Optionally, set 'create_user_account' to true if you want the role to create the user account."
21+
type: "list"
22+
elements: "dict"
23+
default: []
24+
required: false
25+
options:
26+
name:
27+
description:
28+
- "Name of the user account."
29+
type: "str"
30+
required: true
31+
authorized_keys:
32+
description:
33+
- "List of SSH public keys to authorize for this user."
34+
- "Each key should be in the standard SSH public key format."
35+
type: "list"
36+
elements: "str"
37+
default: []
38+
required: false
39+
create_user_account:
40+
description:
41+
- "Whether to create the user account if it does not exist."
42+
- "If set to false, the user account must already exist."
43+
type: "bool"
44+
default: false
45+
required: false
46+
ssh_authorized_keys_exclusive:
47+
description:
48+
- "Whether to remove all other non-specified keys from the authorized_keys file."
49+
- "If set to true, only the keys specified in authorized_keys will remain."
50+
- "If set to false, the specified keys will be added to existing keys."
51+
type: "bool"
52+
default: true
53+
required: false
54+
55+
...

0 commit comments

Comments
 (0)