Files
Dmitriy Rabotyagov 3c5f9b223b Add EL10 support to the role
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/951132
Change-Id: I60df6bda2f30c0d1866640b15089c3fc2ebab75a
2025-06-02 08:48:38 +00:00

38 lines
1.3 KiB
YAML

---
# Copyright 2025, Cleura AB.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Prepare
hosts: network_hosts
vars:
iproute_package_name:
redhat: iproute
debian: iproute2
procps_package_name:
redhat: procps-ng
debian: procps
# Needed for `restorecon` command
selinux_package_name:
redhat: policycoreutils
debian: ''
install_packages:
- "{{ iproute_package_name[ansible_facts['os_family'] | lower] }}"
- "{{ procps_package_name[ansible_facts['os_family'] | lower] }}"
- "{{ selinux_package_name[ansible_facts['os_family'] | lower] }}"
- gnupg2
tasks:
- name: Install required packages
ansible.builtin.package:
name: "{{ install_packages | select() }}"
update_cache: "{{ (ansible_facts['os_family'] | lower == 'debian') | ternary(true, omit) }}"