Skip to content

Commit dfcb573

Browse files
committed
Update - add update cache option
1 parent ca134ef commit dfcb573

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Only dnf must be available on the target machine.
3030
| Variable Name | Example Usage | Required | Description
3131
| ----------- | ----------- | ----------- | ----------- |
3232
| `el_patching_exclude_packages` | <pre>el_patching_exclude_packages:<br>&emsp;- tar<br>&emsp;- zip</pre> | No | Exclude packages during patching.
33+
| `el_patching_update_cache` | `true` | No | Force dnf to check if cache is out of date and re-download if needed.
3334

3435
## Dependencies
3536

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ el_patching_auto_reboot: false
99
# el_patching_exclude_packages:
1010
# - tar
1111
# - zip
12+
# el_patching_update_cache: true

tasks/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
ansible.builtin.dnf:
1111
name: "*"
1212
state: latest
13+
update_cache: "{{ el_patching_update_cache | default(omit) }}"
1314
exclude: "{{ el_patching_exclude_packages | default(omit) }}"
1415
when: el_patching_method == "all"
1516

@@ -18,6 +19,7 @@
1819
name: "*"
1920
security: true
2021
state: latest
22+
update_cache: "{{ el_patching_update_cache | default(omit) }}"
2123
exclude: "{{ el_patching_exclude_packages | default(omit) }}"
2224
when: el_patching_method == "security"
2325

@@ -26,6 +28,7 @@
2628
name: "*"
2729
bugfix: true
2830
state: latest
31+
update_cache: "{{ el_patching_update_cache | default(omit) }}"
2932
exclude: "{{ el_patching_exclude_packages | default(omit) }}"
3033
when: el_patching_method == "bugfix"
3134

@@ -43,4 +46,4 @@
4346
- name: Reboot host
4447
ansible.builtin.reboot:
4548
reboot_timeout: "{{ el_patching_reboot_timeout }}"
46-
when: el_patching_auto_reboot | bool and __el_patching_need_restart.rc == 1
49+
when: el_patching_auto_reboot | bool and __el_patching_need_restart.rc == 1

0 commit comments

Comments
 (0)