Check for creation of private key during its generation (#322)

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.
pull/330/head
Casey Lang 7 years ago committed by Dan Guido
parent bb55985ab4
commit 9b76282a37

@ -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 }}

Loading…
Cancel
Save