Skip to content

Commit

Permalink
Work around bugs in Ansible 2.9 and ansible-base 2.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 29, 2022
1 parent 9995b01 commit d741140
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/integration/targets/filter_x509_crl_info/tasks/impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,24 @@
src: "{{ remote_tmp_dir }}/ca-crl1.crl"
register: content

- name: Retrieve CRL 1 infos from DER
- name: Retrieve CRL 1 infos from DER (raw bytes)
set_fact:
crl_1_info_4: >-
{{ content.content | b64decode | community.crypto.x509_crl_info }}
# Ansible 2.9 and ansible-base 2.10 on Python 2 mangle bytes, so do not run this on these versions
when: ansible_version.string is version('2.11', '>=') or ansible_python.version.major > 2

- name: Retrieve CRL 1 infos from DER (Base64 encoded)
set_fact:
crl_1_info_5: >-
{{ content.content | community.crypto.x509_crl_info }}
- name: Validate CRL 1
assert:
that:
- crl_1_info_4.format == 'der'
- crl_1_info_4 is not defined or crl_1_info_4.format == 'der'
- crl_1_info_5.format == 'der'
- crl_1_info_4 == crl_1_info_5
- crl_1_info_4 is not defined or crl_1_info_4 == crl_1_info_5

- name: Create CRL 2
x509_crl:
Expand Down

0 comments on commit d741140

Please sign in to comment.