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.
This commit is contained in:
Casey Lang 2017-03-31 12:25:39 -05:00 committed by Dan Guido
parent bb55985ab4
commit 9b76282a37

View file

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