diff options
Diffstat (limited to 'deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_keypair/tasks')
-rw-r--r-- | deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_keypair/tasks/main.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_keypair/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_keypair/tasks/main.yml new file mode 100644 index 000000000..4ac8a48f1 --- /dev/null +++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_keypair/tasks/main.yml @@ -0,0 +1,19 @@ +- name: Create keypair + os_keypair: + state: present + name: "{{ keypair.name }}" + register: keypair + +- name: Create local public key + local_action: + module: copy + content: "{{ keypair.key.public_key }}" + dest: "~/.ssh/{{ keypair.key.name }}.pub" + mode: 0600 + +- name: Create local private key + local_action: + module: copy + content: "{{ keypair.key.private_key }}" + dest: "~/.ssh/{{ keypair.key.name }}" + mode: 0600 |