you could do no_log: true

On Saturday, August 19, 2023 at 1:04:43 PM UTC-5 Atul Nasir wrote:

> ---
> - 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/3bedb51b-16ad-4559-816e-22c67e3635e5n%40googlegroups.com.

Reply via email to