@@ -74,15 +74,15 @@ stackhpc_apt_repositories:
7474# Do not replace apt configuration for non-overcloud hosts. This can result in
7575# errors if apt reconfiguration is performed before local repository mirrors
7676# are deployed.
77- apt_repositories : " {{ stackhpc_apt_repositories | selectattr('required') | list if 'overcloud' in group_names else [] }}"
77+ apt_repositories : " {{ stackhpc_apt_repositories | selectattr('required') | list if stackhpc_repos_enabled | bool else [] }}"
7878
7979# Whether to disable repositories in /etc/apt/sources.list. This may be used
8080# when replacing the distribution repositories via apt_repositories.
8181# Default is false.
8282# Do not disable the default apt configuration for non-overcloud hosts. This
8383# can result in errors if apt reconfiguration is performed before local
8484# repository mirrors are deployed.
85- apt_disable_sources_list : " {{ 'overcloud' in group_names }}"
85+ apt_disable_sources_list : " {{ stackhpc_repos_enabled | bool }}"
8686
8787# Apt auth configuration for accessing the package repository mirror.
8888stackhpc_apt_auth :
@@ -98,7 +98,7 @@ stackhpc_apt_auth:
9898# * filename: Name of a file in which to store the auth configuration. The
9999# extension should be '.conf'.
100100# Default is an empty list.
101- apt_auth : " {{ stackhpc_apt_auth if 'overcloud' in group_names and stackhpc_repo_mirror_username is truthy else [] }}"
101+ apt_auth : " {{ stackhpc_apt_auth if stackhpc_repos_enabled | bool and stackhpc_repo_mirror_username is truthy else [] }}"
102102
103103# ##############################################################################
104104# Dummy variable to allow Ansible to accept this file.
0 commit comments