-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ansible-lint - use changed_when for conditional tasks; add line lengt…
…h comment (#344) * ansible-lint - use changed_when for conditional tasks; add line length comment ansible-lint now requires the use of changed_when even for conditional tasks Add yamllint line-length suppression Fix jinja spacing Use descriptive task names Signed-off-by: Rich Megginson <rmeggins@redhat.com> * fix exception/error message checking * ansible 2.9 errors are in a different variable --------- Signed-off-by: Rich Megginson <rmeggins@redhat.com>
- Loading branch information
Showing
4 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
--- | ||
- name: Make sure COPR is not already enabled | ||
- name: Get list of COPRs | ||
shell: | | ||
set -euo pipefail | ||
{{ ansible_pkg_mgr }} repolist | \ | ||
grep -c `echo {{ repo.repository }} | tr / :` || true | ||
register: copr_present | ||
changed_when: false | ||
|
||
- name: Get list of COPRs to be enabled | ||
- name: Enable COPRs | ||
command: | ||
cmd: "{{ ansible_pkg_mgr }} -y copr enable {{ repo.repository }}" | ||
when: copr_present.stdout == "0" | ||
changed_when: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters