---
- name: Your Playbook
hosts: localhost
tasks:
- name: when jenkins job is created
debug:
msg: "{ Job doesn't exist on any of the jenkins so Created the job
on https://<jenkinsbuild.com> }"
when: your_condition_here
register: jenkins_output
- name: Save Repo Names to File
# Your task definition here
- name: Filter Repo Names
# Your task definition here
- name: Debug Job Info
debug:
var: repos_list
when: jenkins_output|default(false)
On Wednesday, July 26, 2023 at 10:10:10 AM UTC-7 Narmada Karthika wrote:
> I have a playbook with bunch of tasks, I am running that playbook on
> jenkins and all my tasks are working fine. I just don't want all the output
> to be seen on the screen except the debug msg. Hoc can I achieve this.
>
> TASK [Save Repo Names to File]
> ************************************************* changed: [localhost] TASK
> [Filter Repo Names] *******************************************************
> ok: [localhost] TASK [Debug Job Info]
> ********************************************************** ok: [localhost]
> => { "repos_list": [ "repo1" ] }
>
> I just need only this
>
> TASK [when jenkins job is created]
> ********************************************* ok: [localhost] =>
> (item={'project': 'itapps', 'repo': 'repo1', 'scmUrl': 'https://github.com
> <https://github.tesla.com/>'}) => { "msg": "{ Job doesn't exist on any of
> the jenkins so Created the job on https://<jenkinsbuild.com
> <https://build.teslamotors.com/>> } \n" }
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b7a62146-baae-4c94-9d61-d1895d02c75fn%40googlegroups.com.