File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2323* ` ssh_keys_generate_keys.{n}.size ` : [ default: ` 4096 ` ] : Size in bits of the TLS/SSL key to generate
2424* ` ssh_keys_generate_keys.{n}.type ` : [ default: ` RSA ` ] : The algorithm used to generate the private key
2525
26+ * ` ssh_keys_generate_keys_command ` : [ optional, default: ` _ssh_keys_generate_keys_command ` ] :
27+ * ` ssh_keys_generate_keys_become ` : [ optional, default: ` false ` ] : Whether or not to use ` sudo ` when generating ssh keys (locally)
28+
2629* ` ssh_keys_private_keys ` : [ default: ` [] ` ] : Private key declarations
2730* ` ssh_keys_private_keys.{n}.owner ` : [ required] : The name of the user that should own the file
2831* ` ssh_keys_private_keys.{n}.group ` : [ default: ` owner ` ] : The name of the group that should own the file
5457* ` ssh_keys_known_hosts.{n}.enctype ` : [ required] : The type of the fingerprint
5558* ` ssh_keys_known_hosts.{n}.fingerprint ` : [ required] : The actual fingerprint
5659
57- * ` ssh_keys_generate_keys_local_become ` : [ optional, default: false] : Whether to use sudo when generating ssh keys locally
58-
5960## Dependencies
6061
6162None
Original file line number Diff line number Diff line change 11# defaults file
22---
33ssh_keys_generate_keys : []
4+ ssh_keys_generate_keys_become : false
45ssh_keys_private_keys : []
56ssh_keys_public_keys : []
67ssh_keys_authorized_keys : []
78ssh_keys_known_hosts : []
8- ssh_keys_generate_keys_local_become : false
Original file line number Diff line number Diff line change 11# tasks file
22---
33- block :
4+
45 - name : generate | create ssh key generation directory
56 file :
67 path : " {{ item.path | dirname }}"
1314 - ssh-keys-generate-directories
1415
1516 - name : generate | generate private ssh key
16- shell : " {{ ssh_keys_generate_command | default(_ssh_keys_generate_command ) }}"
17+ shell : " {{ ssh_keys_generate_keys_command | default(_ssh_keys_generate_keys_command ) }}"
1718 tags :
1819 - ssh-keys-generate-private-keys
1920 - skip_ansible_lint
4546 with_items : " {{ ssh_keys_generate_keys }}"
4647 tags :
4748 - ssh-keys-generate-public-keys
49+
4850 delegate_to : localhost
49- become : " {{ ssh_keys_generate_keys_local_become }}"
51+ become : " {{ ssh_keys_generate_keys_become }}"
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ssh_keys_sshdir: '.ssh'
44ssh_keys_private_key_filename : ' id_rsa'
55ssh_keys_public_key_filename : ' id_rsa.pub'
66ssh_keys_known_hosts_path : /etc/ssh/ssh_known_hosts
7- _ssh_keys_generate_command : >-
7+ _ssh_keys_generate_keys_command : >-
88 openssl \
99 gen{{ item.type | default('rsa') }} \
1010 -out {{ item.path }} \
You can’t perform that action at this time.
0 commit comments