Skip to content

Commit 57d1d3c

Browse files
committed
don't overwrite existing dnf.conf
1 parent ace4232 commit 57d1d3c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ansible/bootstrap.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
become: yes
55
tasks:
66
- name: Ensure releasever is pinned to 9.4 for RL9
7+
lineinfile:
8+
path: /etc/dnf/dnf.conf
9+
regexp: '^releasever='
10+
line: 'releasever=9.4'
11+
insertafter: '^\[main\]'
12+
create: yes
713
when: ansible_distribution_major_version == "9"
8-
copy:
9-
content: |
10-
[main]
11-
releasever=9.4
12-
dest: /etc/dnf/dnf.conf
13-
owner: root
14-
group: root
15-
mode: '0644'
1614

1715
- hosts: cluster
1816
gather_facts: false

0 commit comments

Comments
 (0)