Skip to content

Commit a0899ef

Browse files
committed
fix squid/dnf ordering problem
1 parent d317920 commit a0899ef

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

ansible/bootstrap.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,35 @@
127127
that: dnf_repos_password is undefined
128128
fail_msg: Passwords should not be templated into repofiles during configure, unset 'dnf_repos_password'
129129
when: appliances_mode == 'configure'
130-
- name: Replace system repos with pulp repos
131-
ansible.builtin.include_role:
132-
name: dnf_repos
133-
tasks_from: set_repos.yml
134130

135-
# --- tasks after here require access to package repos ---
136131
- hosts: squid
137132
tags: squid
138133
gather_facts: yes
139134
become: yes
140135
tasks:
136+
# - Installing squid requires working dnf repos
137+
# - Configuring dnf_repos itself requires working dnf repos to install epel
138+
# - Hence do this on squid nodes first in case they are proxying others
139+
- name: Replace system repos with pulp repos
140+
ansible.builtin.include_role:
141+
name: dnf_repos
142+
tasks_from: set_repos.yml
143+
when: "'dnf_repos' in group_names"
141144
- name: Configure squid proxy
142145
import_role:
143146
name: squid
144147

148+
- hosts: dnf_repos
149+
tags: dnf_repos
150+
gather_facts: yes
151+
become: yes
152+
tasks:
153+
- name: Replace system repos with pulp repos
154+
ansible.builtin.include_role:
155+
name: dnf_repos
156+
tasks_from: set_repos.yml
157+
158+
# --- tasks after here require general access to package repos ---
145159
- hosts: tuned
146160
tags: tuned
147161
gather_facts: yes

0 commit comments

Comments
 (0)