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)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.