Skip to content

Commit db1f54b

Browse files
kalstoKaleb Stolee
andauthored
Add result_fact_cacheable var (#231)
* Fix cacheable for parse_leapp_report * change var to match previous PR * Adding changelog for change --------- Co-authored-by: Kaleb Stolee <kstolee@redhat.com>
1 parent eb7e13c commit db1f54b

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- Add optional parameter for allowing caching of facts within AAP

roles/parse_leapp_report/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ The `parse_leapp_report` role is used by the `analysis` or `upgrade` roles to ch
77
| Name | Default value | Description |
88
|-------------------------|-----------------------|-----------------------------------------------------|
99
| result_filename | "/var/log/leapp/leapp-report.txt" | Path of the Leapp pre-upgrade report file. |
10-
| result_filename_prefix | "/var/log/leapp/leapp-report | The path used and the prefix name setting for the Leapp report |
11-
| result_filename_json | "{{ result_filename_prefix }}.json | JSON filename using the selected "result_filename_prefix" |
10+
| result_filename_prefix | "/var/log/leapp/leapp-report" | The path used and the prefix name setting for the Leapp report |
11+
| result_filename_json | "{{ result_filename_prefix }}.json" | JSON filename using the selected "result_filename_prefix" |
12+
| result_fact_cacheable | false | Allow the results from parsing the LEAPP report be cacheable (primarily for AAP) |
1213

1314
## Example playbook
1415

roles/parse_leapp_report/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# defaults file for parse_leapp_report
33
result_filename_prefix: /var/log/leapp/leapp-report
44
result_filename_json: "{{ result_filename_prefix }}.json"
5+
result_fact_cacheable: false
56
...

roles/parse_leapp_report/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
- name: Parse report results
1717
ansible.builtin.set_fact:
18+
cacheable: "{{ result_fact_cacheable }}"
1819
leapp_report_txt: "{{ results_txt.content | b64decode | split('\n') }}"
1920
leapp_report_json: "{{ results_json.content | b64decode | from_json }}"
2021

2122
- name: Check for inhibitors
2223
ansible.builtin.set_fact:
24+
cacheable: "{{ result_fact_cacheable }}"
2325
upgrade_inhibited: true
2426
leapp_inhibitors: "{{ leapp_inhibitors | default([]) + [item] }}"
2527
when:

0 commit comments

Comments
 (0)