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/182fad92-0544-4697-bec5-8852f7283104%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to