mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-23 10:57:51 +00:00
65 lines
2 KiB
YAML
65 lines
2 KiB
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
---
|
|
- name: Gather the minimum subset of ansible_facts required by the network
|
|
role test
|
|
setup:
|
|
gather_subset: min
|
|
when: not ansible_facts.keys() | list |
|
|
intersect(network_test_required_facts) == network_test_required_facts
|
|
vars:
|
|
network_test_required_facts:
|
|
- distribution
|
|
- distribution_major_version
|
|
- distribution_version
|
|
- os_family
|
|
|
|
- name: Determine if system is ostree and set flag
|
|
when: not __network_is_ostree is defined
|
|
block:
|
|
- name: Check if system is ostree
|
|
stat:
|
|
path: /run/ostree-booted
|
|
register: __ostree_booted_stat
|
|
|
|
- name: Set flag to indicate system is ostree
|
|
set_fact:
|
|
__network_is_ostree: "{{ __ostree_booted_stat.stat.exists }}"
|
|
|
|
- name: Fix CentOS6 Base repo
|
|
copy:
|
|
dest: /etc/yum.repos.d/CentOS-Base.repo
|
|
content: |
|
|
[base]
|
|
name=CentOS-$releasever - Base
|
|
baseurl=https://vault.centos.org/6.10/os/$basearch/
|
|
gpgcheck=1
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
|
|
|
[updates]
|
|
name=CentOS-$releasever - Updates
|
|
baseurl=https://vault.centos.org/6.10/updates/$basearch/
|
|
gpgcheck=1
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
|
|
|
[extras]
|
|
name=CentOS-$releasever - Extras
|
|
baseurl=https://vault.centos.org/6.10/extras/$basearch/
|
|
gpgcheck=1
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
|
mode: "0644"
|
|
when:
|
|
- ansible_facts['distribution'] == 'CentOS'
|
|
- ansible_facts['distribution_major_version'] == '6'
|
|
|
|
- name: Setup epel on EL 7
|
|
when:
|
|
- ansible_facts['distribution'] == 'CentOS'
|
|
- ansible_facts['distribution_major_version'] == '7'
|
|
yum_repository:
|
|
name: epel
|
|
description: Extra Packages for Enterprise Linux 7
|
|
baseurl: https://archives.fedoraproject.org/pub/archive/epel/{{ ansible_facts['distribution_major_version'] }}/{{ ansible_facts['architecture'] }}/
|
|
gpgcheck: 0
|
|
enabled: 1
|
|
skip_if_unavailable: 1
|
|
state: present
|