aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml')
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml
index a330875d8..8a7c72092 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/create_keypair/tasks/main.yml
@@ -5,11 +5,11 @@
register: keypair
- name: Create local public key
- local_action:
- module: copy
+ copy:
content: "{{ keypair.key.public_key }}"
dest: "~/.ssh/{{ keypair.key.name }}.pub"
mode: 0600
+ delegate_to: localhost
- name: Check if local private key exists
stat:
@@ -17,9 +17,9 @@
register: local_private_key
- name: Create local private key
- local_action:
- module: copy
+ copy:
content: "{{ keypair.key.private_key }}"
dest: "~/.ssh/{{ keypair.key.name }}"
mode: 0600
- when: local_private_key.stat.exists == False
+ delegate_to: localhost
+ when: not local_private_key.stat.exists