
site.yml:
---
- hosts: localhost
connection: local
post_tasks:
- name: "List dir"
tags: always
shell: "ls -la"
register: logs_result
- debug:
var: logs_result.stdout_lines
Executando:
ansible-playbook -t abc site.yml
Não consigo ver a saída. Como fazer debug
sempre funcionar independente da tag?
Responder1
Adicionar tags: always
à tarefa de depuração deve funcionar.
- debug:
var: logs_result.stdout_lines
tags: always