Commit Graph

17 Commits

Author SHA1 Message Date
Ian Wienand 6d23d20f2f linters: add names to blocks
This is preparation for a later version of ansbile-lint, which finds
missing names on blocks.  This seems a reasonable rule, and the
Ansible manual says [1]

  Names for blocks have been available since Ansible 2.3. We recommend
  using names in all tasks, within blocks or elsewhere, for better
  visibility into the tasks being executed when you run the playbook.

This simply adds a name tag for blocks that are missing it.  This
should have no operational change, but allows us to update the linter
in a follow-on change.

[1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html

Change-Id: I92ed4616775650aced352bc9088a07e919f1a25f
2022-07-27 17:13:39 +10:00
Sorin Sbarnea 086d1a9284 More E208 fixes
Change-Id: Iddda539a24e03ae33ef5e37630f98a7268f18dbe
2020-11-03 10:04:27 +00:00
Ian Wienand 1dcda3ff36 ara-report: add option for artifact prefix
After https://review.opendev.org/#/c/742971 the report is generated on
the host.  For system-config, this means the report ends up copied to
"bridge.openstack.org/ara-report" in the logs directory; but the
artifact points to the non-existant top-directory.

Add a variable to allow a top-level dir to be set.

Needed-By: https://review.opendev.org/747101
Change-Id: I61a7d7328b5a45fc8dee09909f9411c397dd31b6
2020-08-20 14:39:05 +10:00
yatinkarel 00f4aab4d9 Fix url for ARA report
https://review.opendev.org/#/c/742971 changed
defaults for ara_report_path to be an absolute path but
missed changes in zuul artifacts. The url here
needs to be relative to log dir to be browsable.

Change-Id: I53511709227ea890eb417778be89e49e03771ff2
2020-08-12 12:27:17 +05:30
James E. Blair c24c09e82c Allow ara-report to run on any node
This role had some assumptions that it would run only on the
zuul-executor.  If we remove those assumptions, it can run on any
worker node, which allows it to be used in untrusted playbooks.

Note that this is backwards compatible only in the case that the
user did not provide a non-default value for ara_report_path.  If
a user overrode that (eg, to put the report in a directory other
than "ara" under the executor log dir), this will break.

Change-Id: I3a28368a049fa583398ece8a66f90783f53098f4
2020-07-24 18:56:02 +00:00
Sorin Sbarnea 4af438d136 Made sequence indent consistent
Change-Id: I5ea4232ca4fd6e03d5b5f72eb6704bee84d04ea5
2020-05-07 14:13:55 +01:00
Albin Vass 1d16e4b954 ara-report: use failed_when: false instead of ignore_errors: true
Change-Id: Ifcae8ed00406bd8e5f5b1f317e22395c4e83bba9
2020-04-28 16:20:20 +02:00
Fabien Boucher d27ab338b5 Make ara-report role to zuul_return an artifact
Change-Id: Ic3e90d06ac7e62d76c7fb0a67826f77f00ebbca0
2020-01-23 18:33:06 +01:00
Andreas Jaeger ba12fb98a0 Fix ansible-2.9 skipped problem
ansible-2.9 does not allow "|skipped" anymore, it needs "is skipped"
instead, fix the only usage.

See also Ic0c93f2ea896ead76922694e6150882d8a280daf and
Id6c62da8f8a94c270d8a5d5981683a9d8c4e7ad6.

Change-Id: I597c92d2f6dce31dab1ac4bf52bb534c8146b33b
2020-01-23 07:47:49 +01:00
Paul Belanger 0f0d9bd2e2 Revert "Make ara-report role to zuul_return an artifact"
This seems to introduce the following error with Ansible 2.9

 "The conditional check 'not ara_generated | skipped' failed. 
 The error was: template error while templating string: no filter named 'skipped'. 

This reverts commit 262c16b305.

Change-Id: Id6c62da8f8a94c270d8a5d5981683a9d8c4e7ad6
2020-01-23 00:39:47 +00:00
Fabien Boucher 262c16b305 Make ara-report role to zuul_return an artifact
Change-Id: If9bf0ff28abeffba70937ceff9733fc2c975e6ca
2019-12-06 16:48:53 +01:00
Andreas Jaeger fdb76f424e Update URL for OpenDev
Update URL that is now redirected to the new location.

Change-Id: Ic3ae59c0b52357e10fe28f9e23e41cf96401202f
2019-04-20 14:18:36 +02:00
Paul Belanger 454aa33f90 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>
2019-03-29 16:31:26 -04:00
Zuul 6614d8b091 Merge "ara-report: add missing ara_report_run check" 2018-07-16 13:52:15 +00:00
Tristan Cacqueray 5f3910e563 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
2018-06-24 23:58:51 +00:00
Tristan Cacqueray b91ecb27db ara-report: add missing ara_report_run check
This change uses the ara_report_run variable to toggle the database copy.
Otherwise, when ara_report_run is set to 'failure', then the report is
still created if the job succeed

Change-Id: I722a2bff82af2a37fbdec49b2bfd1ad95059ecbe
2018-06-24 23:54:41 +00:00
David Moreau-Simard d75f5d2bf2 Refactor "emit-ara-html" into a new role: "ara-report"
We are going to provide support the ARA sqlite middleware which
provides the ability for an ARA web application to dynamically load
databases, eliminating the need for HTML generation.

HTML generation does not scale very well: it's orders of magnitude
larger than the database file containing the data and it also takes
a significant amount of time to generate the report.

It would be awkward to add dynamic database things into a role called
"emit-ara-html" and so I took the opportunity to refactor things a
little bit and make the role less prone to failures.

Note that this role was developed with the nested Ansible use case in
mind -- a job running it's own copy of Ansible with ARA should be able
to use this role to generate the report or save the database.

This role will be tested with 'base-test' first and it is expected to
make the 'emit-ara-html' role obsolete if everything works well.

Change-Id: Idedc0bfa1f0f89356b795fb9e2a16f9421a2dc18
Depends-On: I3b10c93b4902a9b45e23c227863e472697f662ef
2018-03-19 15:45:34 +00:00