How can I hide skipped tasks output in Ansible

后端 未结 5 2167
你的背包
你的背包 2020-12-30 23:32

I have Ansible role, for example

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

- name: Deploy app2
  include         


        
5条回答
  •  臣服心动
    2020-12-31 00:02

    If you don't mind losing colours you can elide the skipped tasks by piping the output through sed:

    ansible-playbook whatever.yml | sed -nr '/^TASK/{h;n;/^skipping:/{n;b};H;x};p'
    

提交回复
热议问题