From ddcbc2d02327570b573994c87b0beb9fdf4aaf8b Mon Sep 17 00:00:00 2001 From: hadeskun Date: Mon, 9 Dec 2024 10:38:57 +0100 Subject: [PATCH] Add how to set an ansible task as softfailed Add how to set an ansible task as softfailed. --- README.md | 13 +++++++++++++ ansible/playbooks/registration.yaml | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ec61535b..f81c1fd8 100644 --- a/README.md +++ b/README.md @@ -275,3 +275,16 @@ If the user does not wish to copy the role in the `roles` folder of this reposit export ANSIBLE_ROLES_PATH= . . . (run deployment as you would normally do) ``` + +### How to rewrite an ansible task to be softfailed automatically in OSADO + +To softfailed an ansible task it is needed to add a msg attribute in the task following this format: +```shell +msg: "[OSADO][softfail] [bsc or jsc]#[number] [short description]" +``` +Here a complete example: +```shell +- 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." +``` diff --git a/ansible/playbooks/registration.yaml b/ansible/playbooks/registration.yaml index b7476960..b0dd4fe3 100644 --- a/ansible/playbooks/registration.yaml +++ b/ansible/playbooks/registration.yaml @@ -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."