Map all relevant architectures for deb822 repository setup

At the moment we fixup only x86_64 arch while there way more arches
in the wild. So it's worth to have a mapping for architectures in place
rather then maintain quite complex replaces.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/930272
Related-Bug: #2081764
Change-Id: I471fc337c0f13a5b8b10131760ed96032a34f9e8
This commit is contained in:
Dmitriy Rabotyagov
2024年09月24日 11:27:42 +02:00
parent 20b09197a2
commit 494590447e

View File

@@ -54,14 +54,11 @@
name:python3-debian
- name:Manage apt repositories
vars:
_a:"{{ item.architectures }}"
_architecture_fixup:"{{ ((_a | d([])) is iterable and (_a | d([])) is not string) | ternary(_a, [_a]) | map('replace', 'x86_64', 'amd64') }}"
ansible.builtin.deb822_repository:
allow_downgrade_to_insecure:"{{ item.allow_downgrade_to_insecure | default(omit) }}"
allow_insecure:"{{ item.allow_insecure | default(omit) }}"
allow_weak:"{{ item.allow_weak | default(omit) }}"
architectures:"{{ (_architecture_fixup | length > 0) | ternary(_architecture_fixup, omit) }}"
architectures:"{{ item.architectures | default(omit) }}"
by_hash:"{{ item.by_hash | default(omit) }}"
check_date:"{{ item.check_date | default(omit) }}"
check_valid_until:"{{ item.check_valid_until | default(omit) }}"
Reference in New Issue
openstack/openstack-ansible-rabbitmq_server
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.