i use following script can not redirect debug to a file and also can not 
change password or add user

---
- hosts: Testdevices
  gather_facts: false
  connection: local
  vars:
     date: "{{ lookup('pipe', 'date +%Y%m%d') }}"
  tasks:
   - name: change password
     ios_config:
       lines:
         - config t
         - username smsi privilege 15 password 0 password
         - line vty 5 15
         - login local

  - name: print out command
     debug:
       var: result2
     register: result2

   - local_action: copy content={{ result2 }} dest=/etc/ansible/debugmsg.txt



 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1476855e-394c-40db-86aa-2c35a1d43dfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to