Move keypair module to proxy layer

Update keypair module to new openstacksdk

Change-Id: I8f29d983b176e83fbca1919be34a86fe4756aa5e
This commit is contained in:
Arx Cruz
2022-05-10 11:23:51 +02:00
committed by Rafael Castillo
parent 81a81ad759
commit 6d8c965333
2 changed files with 56 additions and 24 deletions

View File

@@ -6,6 +6,12 @@
state: present
register: keypair
- name: Assert fields
assert:
that:
- item in keypair.keypair
loop: "{{ expected_fields }}"
- name: Get list of all keypairs
openstack.cloud.keypair_info:
cloud: "{{ cloud }}"
@@ -32,7 +38,7 @@
- name: Ensure public key is returned
assert:
that:
- keypair.key.public_key is defined and keypair.key.public_key
- keypair.keypair.public_key is defined and keypair.keypair.public_key
- name: Create another keypair
openstack.cloud.keypair: