Skip to content

Commit

Permalink
Add how to set an ansible task as softfailed
Browse files Browse the repository at this point in the history
Add how to set an ansible task as softfailed.
  • Loading branch information
hadeskun committed Dec 9, 2024
1 parent f4fec86 commit 923dcdf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,15 @@ If the user does not wish to copy the role in the `roles` folder of this reposit
export ANSIBLE_ROLES_PATH=<the-dir-where-the-role-is-located>
. . . (run deployment as you would normally do)
```

### How to rewrite an ansible task to be softfailed automatically in OSADO

Check warning on line 279 in README.md

View workflow job for this annotation

GitHub Actions / Markdown lint (README.md)

Unknown word (softfailed)

Check warning on line 279 in README.md

View workflow job for this annotation

GitHub Actions / Markdown lint (README.md)

Unknown word (OSADO)

To softfailed an ansible task it is needed to add a msg attribute in the task following this format:

Check warning on line 281 in README.md

View workflow job for this annotation

GitHub Actions / Markdown lint (README.md)

Unknown word (softfailed)

msg: "[OSADO][softfail] [bsc or jsc]#[number] [short description]"

Check warning on line 283 in README.md

View workflow job for this annotation

GitHub Actions / Markdown lint (README.md)

Unknown word (OSADO)

Here a complete example:

* name: Example of debug message with Bugzilla mention, minds to be intercepted by OSADO test

Check warning on line 287 in README.md

View workflow job for this annotation

GitHub Actions / Markdown lint (README.md)

Unknown word (OSADO)
ansible.builtin.debug:
msg: "[OSADO][softfail] bsc#123456789 Here a generic message with some explanations."

Check warning on line 289 in README.md

View workflow job for this annotation

GitHub Actions / Markdown lint (README.md)

Unknown word (OSADO)
8 changes: 0 additions & 8 deletions ansible/playbooks/registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,3 @@
ansible.builtin.command: zypper lr -u
register: repos_after
failed_when: repos_after.rc != 0

- name: Example of debug message with Bugzilla mention, minds to be intercepted by OSADO test
ansible.builtin.debug:
msg: "[OSADO][softfail] bsc#123456789 Here a generic message with some explanations."

- name: Example of debug message with Jira mention, minds to be intercepted by OSADO test
ansible.builtin.debug:
msg: "[OSADO][softfail] jsc#PROJECT-1234 Here a generic message with some explanations."

0 comments on commit 923dcdf

Please sign in to comment.