Hello,
I've seen this use case before. It's easier to build the reporting
directly into the playbook. You can, for exmaple, create a template that
will print what you want for each managed host, and assemble the pieces
later:
On 2/13/19 11:55 AM, DM wrote:
The example below is a yaml file
Thanks to all who responded.
The example below is a yaml file to gather data from a Juniper Networks
Switch device.
How would you do it this?
- name: Get Facts
hosts: 192.168.1.1
roles:
- Juniper.junos
connection: local
gather_facts: no
vars_prompt:
- name: ADMUSER
There's nothing in the ansible CLI that supports explicitly dumping the
output to a file. You could just use a simple shell redirect.
$ ansible -i inventories/aws -m setup all > host-facts.yaml
It's worth noting that the CLI's output doesn't make a distinction between
failed plays or tasks in
Hi,
If you want include task in your playbook, you must only do it :
*- include_task: /my_path/.../.../my_file_externe.yml*
This answer answers your question ?
Thanks
Le mercredi 13 février 2019 17:46:48 UTC+1, DM a écrit :
>
> Thanks I do have the "---" at the top
> When I run t he
Thanks I do have the "---" at the top
When I run t he ansible-playbook how do get all that info to write to a
file?
It only shows up on the cli which I know I can copy and paste to a file,
but would like to output to a file
Thanks
On Wednesday, February 13, 2019 at 8:45:06 AM UTC-5, DM
Hi,
You must create file with extension .yml and beginning this file with "---"
at the top.
It's simply.
And launch file with line command "ansible-playbook my_file.yml"
This answer answers your question ?
Thanks
Le mercredi 13 février 2019 14:45:06 UTC+1, DM a écrit :
>
> How do you write