Skip to content

Add unified stackhpc_repos_enabled group var #1192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions etc/kayobe/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ stackhpc_apt_repositories:
# Do not replace apt configuration for non-overcloud hosts. This can result in
# errors if apt reconfiguration is performed before local repository mirrors
# are deployed.
apt_repositories: "{{ stackhpc_apt_repositories | selectattr('required') | list if 'overcloud' in group_names else [] }}"
apt_repositories: "{{ stackhpc_apt_repositories | selectattr('required') | list if stackhpc_repos_enabled | bool else [] }}"

# Whether to disable repositories in /etc/apt/sources.list. This may be used
# when replacing the distribution repositories via apt_repositories.
# Default is false.
# Do not disable the default apt configuration for non-overcloud hosts. This
# can result in errors if apt reconfiguration is performed before local
# repository mirrors are deployed.
apt_disable_sources_list: "{{ 'overcloud' in group_names }}"
apt_disable_sources_list: "{{ stackhpc_repos_enabled | bool }}"

# Apt auth configuration for accessing the package repository mirror.
stackhpc_apt_auth:
Expand All @@ -98,7 +98,7 @@ stackhpc_apt_auth:
# * filename: Name of a file in which to store the auth configuration. The
# extension should be '.conf'.
# Default is an empty list.
apt_auth: "{{ stackhpc_apt_auth if 'overcloud' in group_names and stackhpc_repo_mirror_username is truthy else [] }}"
apt_auth: "{{ stackhpc_apt_auth if stackhpc_repos_enabled | bool and stackhpc_repo_mirror_username is truthy else [] }}"

###############################################################################
# Dummy variable to allow Ansible to accept this file.
Expand Down
4 changes: 2 additions & 2 deletions etc/kayobe/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
# file: myrepo
# gpgkey: http://gpgkey
# gpgcheck: yes
#dnf_custom_repos:
dnf_custom_repos: "{{ stackhpc_dnf_repos if stackhpc_repos_enabled | bool else [] }}"

# A dict of custom repositories that point to the local Pulp server.
# To use these repos, set dnf_custom_repos to the value of stackhpc_dnf_repos.
# To use these repos, set stackhpc_repos_enabled to true.
# This is done by default for hosts in the overcloud group via a group_vars
# file.
stackhpc_dnf_repos: "{{ dnf_custom_repos_el9 | combine(dnf_custom_repos_rocky_9) | combine(dnf_custom_repos_elrepo_9 if dnf_install_elrepo_9 | bool else {}) }}"
Expand Down
6 changes: 6 additions & 0 deletions etc/kayobe/inventory/group_vars/all/stackhpc-repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# Use upstream package repos by default to avoid situations where the
# seed-hypervisor tries to use a local pulp repo on the seed VM before the seed
# vm has been provisioned
# This behaviour is overriden for Overcloud hosts.
stackhpc_repos_enabled: false
4 changes: 2 additions & 2 deletions etc/kayobe/inventory/group_vars/overcloud/stackhpc-repos
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Only use local pulp mirrors for overcloud hosts
# to avoid situations where the seed-hypervisor
# tries to use a local pulp repo on the seed VM
# before the seed vm has been provisioned
dnf_custom_repos: "{{ stackhpc_dnf_repos }}"

stackhpc_repos_enabled: true
enable_docker_repo: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
features:
- |
Added a new group variable - ``stackhpc_repos_enabled`` - for unified
control over usage of StackHPC Release Train package repositories. This
makes it easier to set which hosts do or do not pull packages from release
train.
Loading