Skip to content

Commit 6c0202c

Browse files
authored
Merge pull request #23 from nkakouros-forks/local-become
Adds option to not become when generating keys locally
2 parents e18674f + 8398138 commit 6c0202c

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ None
5454
* `ssh_keys_known_hosts.{n}.enctype`: [required]: The type of the fingerprint
5555
* `ssh_keys_known_hosts.{n}.fingerprint`: [required]: The actual fingerprint
5656

57+
* `ssh_keys_generate_keys_local_become`: [optional, default: false]: Whether to use sudo when generating ssh keys locally
58+
5759
## Dependencies
5860

5961
None

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ ssh_keys_private_keys: []
55
ssh_keys_public_keys: []
66
ssh_keys_authorized_keys: []
77
ssh_keys_known_hosts: []
8+
ssh_keys_generate_keys_local_become: false

tasks/generate.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@
4545
with_items: "{{ ssh_keys_generate_keys }}"
4646
tags:
4747
- ssh-keys-generate-public-keys
48-
connection: local
48+
delegate_to: localhost
49+
become: "{{ ssh_keys_generate_keys_local_become }}"

0 commit comments

Comments
 (0)