ec2_key: fix fingerprint generation in tests (#32817)
This commit is contained in:
parent
e23928cb41
commit
f891e92581
2 changed files with 4 additions and 7 deletions
|
@ -219,8 +219,7 @@
|
|||
- 'result.key.name == "{{ec2_key_name}}"'
|
||||
- '"fingerprint" in result.key'
|
||||
- '"private_key" not in result.key'
|
||||
# FIXME - why don't the fingerprints match?
|
||||
# - 'result.key.fingerprint == "{{fingerprint}}"'
|
||||
- 'result.key.fingerprint == "{{fingerprint}}"'
|
||||
|
||||
# ============================================================
|
||||
- name: test state=absent with key_material
|
||||
|
@ -267,8 +266,7 @@
|
|||
- 'result.results[0].key.name == "{{ec2_key_name}}"'
|
||||
- '"fingerprint" in result.results[0].key'
|
||||
- '"private_key" not in result.results[0].key'
|
||||
# FIXME - why doesn't result.key.fingerprint == {{fingerprint}}
|
||||
# - 'result.key.fingerprint == "{{fingerprint}}"'
|
||||
- 'result.results[0].key.fingerprint == "{{fingerprint}}"'
|
||||
|
||||
# ============================================================
|
||||
- name: test state=present with key_material with_files (expect changed=false)
|
||||
|
@ -296,8 +294,7 @@
|
|||
- 'result.results[0].key.name == "{{ec2_key_name}}"'
|
||||
- '"fingerprint" in result.results[0].key'
|
||||
- '"private_key" not in result.results[0].key'
|
||||
# FIXME - why doesn't result.key.fingerprint == {{fingerprint}}
|
||||
# - 'result.key.fingerprint == "{{fingerprint}}"'
|
||||
- 'result.results[0].key.fingerprint == "{{fingerprint}}"'
|
||||
|
||||
# ============================================================
|
||||
- name: test state=absent with key_material (expect changed=true)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
- prepare
|
||||
|
||||
- name: record fingerprint
|
||||
shell: ssh-keygen -lf {{sshkey.stdout}}.pub
|
||||
shell: openssl rsa -in {{sshkey.stdout}} -pubout -outform DER 2>/dev/null | openssl md5 -c
|
||||
register: fingerprint
|
||||
tags:
|
||||
- prepare
|
||||
|
|
Loading…
Reference in a new issue