Allow user to set ara_report_executable

Default to 'ara' for the executable but also allow for a user to use the
full path if they want.

Change-Id: I26aac0d25f071b65b20f97622836abf56e65cebc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-03-29 16:31:26 -04:00
parent 0acf5e7e65
commit 454aa33f90
3 changed files with 9 additions and 2 deletions

View File

@ -57,3 +57,8 @@ If ARA is enabled, generates a report or saves a copy of the ARA database.
When report_type is 'html' directory where the HTML report will be generated.
When report_type is 'database', directory where the database is saved.
.. zuul:rolevar:: ara_report_executable
:default: ``ara``
Path to ara executable.

View File

@ -24,3 +24,5 @@ ara_report_path: 'ara'
# When report_type is 'html', whether to compress the ARA HTML output or not
ara_compress_html: true
ara_report_executable: ara

View File

@ -1,6 +1,6 @@
- block:
- name: Check that ARA is installed
command: bash -c "type -p ara"
command: bash -c "type -p {{ ara_report_executable }}"
ignore_errors: yes
register: ara_installed
@ -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 {{ final_ara_report_path }}"
command: "{{ ara_report_executable }} generate html {{ final_ara_report_path }}"
environment:
ARA_DATABASE: "sqlite:///{{ ara_database_path }}"
when: ara_report_run | bool or