mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-04-09 03:59:23 -02:30
Refactor(defaults): centralize bootstrap_os defaults (#13155)
This commit is contained in:
@@ -20,6 +20,10 @@ openeuler_metalink_enabled: false
|
||||
# Install public repo on Oracle Linux
|
||||
use_oracle_public_repo: true
|
||||
|
||||
## RHEL specific variables
|
||||
# Enable RHEL subscription repos
|
||||
rhel_enable_repos: true
|
||||
|
||||
## Ubuntu specific variables
|
||||
# Disable unattended-upgrades for Linux kernel and all packages start with linux- on Ubuntu
|
||||
ubuntu_kernel_unattended_upgrades_disabled: false
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
name: "oracle-epel-release-el{{ ansible_distribution_major_version }}"
|
||||
state: present
|
||||
when:
|
||||
- use_oracle_public_repo | default(true)
|
||||
- use_oracle_public_repo
|
||||
- '''ID="ol"'' in os_release.stdout_lines'
|
||||
- (ansible_distribution_version | float) >= 7.6
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
- { option: "enabled", value: "1" }
|
||||
- { option: "baseurl", value: "http://yum.oracle.com/repo/OracleLinux/OL{{ ansible_distribution_major_version }}/addons/$basearch/" }
|
||||
when:
|
||||
- use_oracle_public_repo | default(true)
|
||||
- use_oracle_public_repo
|
||||
- '''ID="ol"'' in os_release.stdout_lines'
|
||||
- (ansible_distribution_version | float) >= 7.6
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
- { option: "gpgcheck", value: "0" }
|
||||
- { option: "baseurl", value: "http://mirror.centos.org/centos/{{ ansible_distribution_major_version }}/extras/$basearch/os/" }
|
||||
when:
|
||||
- use_oracle_public_repo | default(true)
|
||||
- use_oracle_public_repo
|
||||
- '''ID="ol"'' in os_release.stdout_lines'
|
||||
- (ansible_distribution_version | float) >= 7.6
|
||||
- (ansible_distribution_version | float) < 9
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
name:
|
||||
- "rhel-8-for-*-baseos-rpms"
|
||||
- "rhel-8-for-*-appstream-rpms"
|
||||
state: "{{ 'enabled' if (rhel_enable_repos | default(True) | bool) else 'disabled' }}"
|
||||
state: "{{ 'enabled' if (rhel_enable_repos | bool) else 'disabled' }}"
|
||||
when:
|
||||
- ansible_distribution_major_version == "8"
|
||||
- (not rh_subscription_status.changed) or (rh_subscription_username is defined) or (rh_subscription_org_id is defined)
|
||||
|
||||
Reference in New Issue
Block a user