PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, August 18, 2022

[FIXED] How can I hide skipped tasks output in Ansible

 August 18, 2022     ansible, output, plugins     No comments   

Issue

I have Ansible role, for example

---
- name: Deploy app1
  include: deploy-app1.yml
  when: 'deploy_project == "{{app1}}"'

- name: Deploy app2
  include: deploy-app2.yml
  when: 'deploy_project == "{{app2}}"'

But I deploy only one app in one role call. When I deploy several apps, I call role several times. But every time there is a lot of skipped tasks output (from tasks which do not pass condition), which I do not want to see. How can I avoid it?


Solution

Ansible allows you to control its output by using custom callbacks.

In this case you can simply use the skippy callback which will not output anything on a skipped task.

That said, skippy is now deprecated and will be removed in ansible v2.11.



Answered By - ydaetskcoR
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing