Skip to content

Commit 4876046

Browse files
author
Kenji-Imamura
committed
Add generate_ssh_key option
1 parent 58fdd69 commit 4876046

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ The following attributes are required for each user:
3636
* group - optional primary group override
3737
* groups - a list of supplementary groups for the user.
3838
* profile - a string block for setting custom shell profiles
39-
* ssh-key - This should be a list of ssh keys for the user. Each ssh key
39+
* ssh_key - This should be a list of ssh keys for the user. Each ssh key
4040
should be included directly and should have no newlines.
41+
* generate_ssh_key - Whether to generate a SSH key for the user (optional, defaults to no).
4142

4243
In addition, the following items are optional for each user:
4344

tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
uid: "{{item.uid}}"
2424
home: "{{ item.home | default('/home/' + item.username) }}"
2525
createhome: "{{'yes' if users_create_homedirs else 'no'}}"
26+
generate_ssh_key: "{{ item.generate_ssh_key | default(omit) }}"
2627
with_items: "{{users}}"
2728
tags: ['users','configuration']
2829

0 commit comments

Comments
 (0)