File tree Expand file tree Collapse file tree
linux_os/guide/system/software/updating/ensure_redhat_gpgkey_installed/ansible Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 changed_when : false
1919 failed_when : False
2020 check_mode : no
21- register : gpg_fingerprints
21+ register : sq_fingerprints
22+ when : ansible_distribution_version is version('10.1', '>=')
23+
24+ - name : " {{{ rule_title }}}: Set Fact - Installed GPG Fingerprints (sq format)"
25+ ansible.builtin.set_fact :
26+ gpg_installed_fingerprints : " {{ sq_fingerprints.stdout | regex_findall('Fingerprint:\\ s*([0-9A-Fa-f]+)', '\\ 1') | list }}"
2227 when : ansible_distribution_version is version('10.1', '>=')
2328
2429- name : " {{{ rule_title }}}: Read signatures in GPG key"
3035 check_mode : no
3136 when : ansible_distribution_version is version('10.1', '<')
3237
33- - name : " {{{ rule_title }}}: Set Fact - Installed GPG Fingerprints (sq format)"
38+ - name : " {{{ rule_title }}}: Set Fact - Installed GPG Fingerprints (gpg format)"
3439 ansible.builtin.set_fact :
35- gpg_installed_fingerprints : " {{ gpg_fingerprints.stdout | regex_findall('Fingerprint:\\ s*([0-9A-Fa-f]+)', '\\ 1') | list }}"
40+ gpg_installed_fingerprints : " {{ gpg_fingerprints.stdout | regex_findall('^pub.*\\ n(?:^fpr[:]*)([0-9A-Fa-f]*)', '\\ 1') | list }}"
41+ when : ansible_distribution_version is version('10.1', '<')
3642{{% else %}}
3743# RHEL 8, 9 and other versions: Use gpg command
3844
You can’t perform that action at this time.
0 commit comments