I m not looking for ansible.cfg skippy variable method but for a method I can use in specific roles only to avoid skipped messages on stout while running my playbooks.
(cannot use solutions based on grep rejections cause my ansible commands are not launched from a shell or similar but some applications) I can only work on yml files.
How to do that ?
test file
---
- hosts: localhost
vars:
mypath: /tmp/file
tasks:
- stat: path={{mypath}}
register: foo
- debug: var=foo
- name: do something with file if exists
command: cat {{ mypath }}
when: foo.stat.exists
here it fails to avoid the skip message application runs only "ansible-playbook filename" & cannot be modified to include any pipes contrary of the example below :
-bash-4.4$ ansible-playbook filetest.yml | grep -i skip
skipping: [localhost]
If its not possible is it possible on specific playbook at last ?
I repeat I cannot use cfg file solutions at all only environnement variables or an "inside yml" syntax
Thanks.
export ANSIBLE_LOAD_CALLBACK_PLUGINS=1
I hope it can work. ... think it cannot work cause it needs to install plugins for general environnement et not for specific – francois PANSIBLE_STDOUT_CALLBACK
setting – Konstantin Suvorov