It's unclear which task the error is coming from. Next time please include
more log messages
On Tuesday, March 6, 2018 at 2:55:16 AM UTC-8, Marcos Georgopoulos wrote:
>
> ok, I managed to solve this, there was a problem with my install.
>
> On Tuesday, March 6, 2018 at 3:24:17 PM UTC+11, Marcos Georgopoulos wrote:
>>
>> Hi,
>>
>> I am trying to save some results that I have registered to a file on my
>> local machine ( that is running ansible ) The error I am getting is very
>> generic and of no use. Below is the playbook and the resulting error
>>
>> ---
>> - hosts: ios
>> gather_facts: no
>> connection: local
>> vars:
>> cli:
>> host: "{{ inventory_hostname }}"
>> username: cisco
>> password: cisco
>> auth_pass: cisco
>>
>>
>> tasks:
>>
>> - name: DEFINE PROVIDER
>> set_fact:
>> provider:
>> host: "{{ inventory_hostname }}"
>> username: cisco
>> password: cisco
>> auth_pass: cisco
>>
>> - name: RUN 'SHOW RUN'
>> ios_command:
>> provider: "{{ cli }}"
>> authorize: yes
>> commands:
>> - show run
>> register: before_base
>>
>> - debug: var=before_base.stdout_lines
>>
>>
>>
>>
>> - name: "write to local file"
>> copy:
>> content: "{{ before_base.stdout_lines }}"
>> dest: /tmp/test
>> backup: yes
>> run_once: yes
>> delegate_to: localhost
>>
>>
>>
>>
>> fatal: [172.16.1.127 -> localhost]: FAILED! => {
>>
>> "changed": false,
>>
>> "checksum": "d3b2821b4ae84267794786164cdbd16ac3752ad1",
>>
>> "diff": [],
>>
>> "failed": true,
>>
>> "module_stderr": "",
>>
>> "module_stdout": "",
>>
>> "msg": "MODULE FAILURE",
>>
>> "rc": 0
>>
>>
>>
>> Could someone please explain why this is failing and provide me with a
>> way to do this simple task. Many thanks.
>>
>>
>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d46a0843-be95-44be-9f43-c564f5c6677c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.