- name: Display content of resolv.conf
hosts: localhost
tasks:
- name: Display resolv.conf contents
command: cat resolv.conf chdir=/etc
register: command_output
- name: Print to console
debug:
msg: "{{command_output.stdout}}"
Created
November 25, 2022 12:09
-
-
Save barbietunnie/67262aec81f64d523af9a87808a8704e to your computer and use it in GitHub Desktop.
How to dump file contents to console with Ansible
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment