diff --git a/ansible/disable-repos.yml b/ansible/disable-repos.yml index 3e8022965..3b68aee68 100644 --- a/ansible/disable-repos.yml +++ b/ansible/disable-repos.yml @@ -5,3 +5,4 @@ ansible.builtin.include_role: name: dnf_repos tasks_from: disable_repos.yml + when: not dnf_repos_enabled | default(false) | bool diff --git a/environments/.caas/hooks/pre.yml b/environments/.caas/hooks/pre.yml index c8951a4af..8c99e5953 100644 --- a/environments/.caas/hooks/pre.yml +++ b/environments/.caas/hooks/pre.yml @@ -51,3 +51,15 @@ tasks: - name: Reset persistent SSH connections meta: reset_connection + +- hosts: localhost + gather_facts: no + become: no + tasks: + - name: Add hosts to dnf_repos group to enable repofiles + ansible.builtin.add_host: + name: "{{ item }}" + groups: + - dnf_repos + loop: "{{ groups['cluster'] }}" + when: dnf_repos_enabled | default(false) | bool