Add local private key guard 96/116496/2
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 21 Dec 2020 10:23:31 +0000 (11:23 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Wed, 30 Dec 2020 08:09:37 +0000 (09:09 +0100)
commit45abf3d89d1ff5460fcded364f72f4906ab07d35
tree67b0a41026ec3d9da2a5cba14b17e1ed147d0629
parent589467c514d2a7d94106b726e10667bdb5c96a6e
Add local private key guard

Private key can be retrieved from OpenStack during keypair creation
only. Subsequent attempts to do so will result in getting an empty
string. If private key already exists on the local machine and there is
no guard local private key will be overwritten with an empty file.

This patch adds local private key guard which allows subsequent runs of
"create.yml" playbook without erasing local private key.

Issue-ID: INT-1601
Change-Id: If3b3bb088bc8a2f9494e21e1826ac68adcc7a2cb
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_keypair/tasks/main.yml