Add ansible-lint to CI (#886)

* Enable ansible-lint.

* Fix broken task name.

* Fix command-instead-of-shell instances.

* Clean up tasks to eliminate command-instead-of-module.

* Skip yaml errors.

* Remove .stdout from versions.

* Avoid stdin.
This commit is contained in:
Felix Fontein
2025-05-03 14:42:41 +02:00
committed by GitHub
parent 12f958c955
commit 8156468898
53 changed files with 186 additions and 133 deletions

View File

@@ -85,6 +85,10 @@
shell: "{{ openssl_binary }} version | cut -d' ' -f2"
register: openssl_version
- name: Make openssl version a string
set_fact:
openssl_version: "{{ openssl_version.stdout }}"
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
block:
@@ -115,9 +119,13 @@
state: "{{ 'latest' if not target_system_python_cannot_upgrade_cryptography else omit }}"
extra_args: "-c {{ remote_constraints }}"
- name: Obtain cryptography information
community.crypto.crypto_info:
register: crypto_info
- name: Register cryptography version
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
register: cryptography_version
set_fact:
cryptography_version: "{{ crypto_info.python_cryptography_capabilities.version }}"
- name: Print default key sizes
debug: