ara-report: use a different fact name for ara_report_path

This fix ara-report usage when the user manually set the ara-report role variable.
Otherwise the set_fact doesn't override the variable name and the role fails with:

There was an issue creating ara-report as requested: [Errno 30] Read-only file system: b'ara-report'

Change-Id: I8a521e7573d1d1870088efd58be6e1cef2ad06c2
This commit is contained in:
Tristan Cacqueray 2018-06-24 23:58:48 +00:00
parent fbb58ddfde
commit 5f3910e563
1 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@
- name: Prefix the log path with the log root
set_fact:
ara_report_path: "{{ zuul.executor.log_root }}/{{ ara_report_path }}"
final_ara_report_path: "{{ zuul.executor.log_root }}/{{ ara_report_path }}"
- when:
- ara_installed.rc == 0
@ -48,7 +48,7 @@
# Always generate (true), never (false) or only on failure ('failure')
# Additionally cover for edge cases where zuul_success might be undefined
- name: Generate ARA HTML output
command: "ara generate html {{ ara_report_path }}"
command: "ara generate html {{ final_ara_report_path }}"
environment:
ARA_DATABASE: "sqlite:///{{ ara_database_path }}"
when: ara_report_run | bool or
@ -56,7 +56,7 @@
register: ara_generated
- name: Compress ARA HTML output
command: gzip --recursive --best {{ ara_report_path }}
command: gzip --recursive --best {{ final_ara_report_path }}
when:
- ara_compress_html | bool
- not ara_generated | skipped
@ -74,8 +74,8 @@
block:
- name: Create the ARA database report directory
file:
path: "{{ ara_report_path }}"
path: "{{ final_ara_report_path }}"
state: directory
- name: Save the ARA database
command: cp {{ ara_database_path }} {{ ara_report_path }}
command: cp {{ ara_database_path }} {{ final_ara_report_path }}