Hi. I have a very basic cisco IOS playbook i'm working on and when I log the output to a file I cannot read the format. I read a few threads that mention enabling a callback option in the ansible.cfg but that does not seem to work. Does anyone know how I can accomplish logging to a readable text?
---
- name: IOS General Checks
hosts: switches
gather_facts: false
connection: network_cli
tasks:
- name: Standard IOS Checks
ios_command:
commands:
- show int status
- show int description
register: output1
- name: print result
debug:
var: output1.stdout_lines
- name: copy output to file
copy: content="{{ output1.stdout_lines }}" dest=/home/sideswipe/ansible/cisco/logs/{{ inventory_hostname }}.txt
...
# ===============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
display_failed_stderr = no
display_ok_hosts = yes
display_skipped_hosts = yes
show_custom_stats = no
show_per_host_start = no