Skip to content

Commit 01b5aa8

Browse files
authored
Allow enabling package installs for caas clusters via extravars (#667)
* enable caas to turn on dnf_repos via extravars * don't disable repos at end of play when dnf_repos_enabled
1 parent 611513c commit 01b5aa8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

ansible/disable-repos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
ansible.builtin.include_role:
66
name: dnf_repos
77
tasks_from: disable_repos.yml
8+
when: not dnf_repos_enabled | default(false) | bool

environments/.caas/hooks/pre.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,15 @@
5151
tasks:
5252
- name: Reset persistent SSH connections
5353
meta: reset_connection
54+
55+
- hosts: localhost
56+
gather_facts: no
57+
become: no
58+
tasks:
59+
- name: Add hosts to dnf_repos group to enable repofiles
60+
ansible.builtin.add_host:
61+
name: "{{ item }}"
62+
groups:
63+
- dnf_repos
64+
loop: "{{ groups['cluster'] }}"
65+
when: dnf_repos_enabled | default(false) | bool

0 commit comments

Comments
 (0)