Skip to content

Commit

Permalink
Check for creation of private key during its generation (trailofbits#322
Browse files Browse the repository at this point in the history
)

This task was previously checking for the public key even though it is
in place to generate the private key. A simple switch to the `creates`
arg resolves the issue.
  • Loading branch information
caseylang authored and dguido committed Mar 31, 2017
1 parent bb55985 commit 9b76282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playbooks/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Generate the SSH private key
local_action: shell echo -e 'n' | ssh-keygen -b 2048 -C {{ SSH_keys.comment }} -t rsa -f {{ SSH_keys.private }} -q -N ""
args:
creates: "{{ SSH_keys.public }}"
creates: "{{ SSH_keys.private }}"

- name: Generate the SSH public key
local_action: shell echo `ssh-keygen -y -f {{ SSH_keys.private }}` {{ SSH_keys.comment }} > {{ SSH_keys.public }}
Expand Down

0 comments on commit 9b76282

Please sign in to comment.