Difference between revisions of "Ios ping"

From wikieduonline
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{{lowercase}}
 
  #!/usr/bin/env ansible-playbook
 
  #!/usr/bin/env ansible-playbook
 
   
 
   
  - hosts: YOUR_HOSTNAME
+
  - hosts: HOSTNAME
  remote_user: YOUR_REMOTEUSER
+
  [[gather_facts:]] false
 +
  [[connection]]: [[network_cli]]
 +
  remote_user: USERNAME
 
   
 
   
  tasks:
+
  [[tasks:]]
    - name: Test reachability to 10.10.10.10 using default vrf
+
      - ios_ping:
    ios_ping:
+
          dest: 10.10.10.1
        dest: 10.10.10.10
 
  
 +
 +
TASK [ios_ping]
 +
****************************************************************************************************************************
 +
fatal: [SERVER]: FAILED! => {"changed": false, "msg": "Connection type ssh is not valid for this module"}
 +
It maybe a [[paramiko]] problem: https://github.com/ansible/ansible/issues/31699
  
 
== Related terms ==
 
== Related terms ==
 
* [[Ansible examples]]
 
* [[Ansible examples]]
 
+
* <code>[[--private-key]]</code>
 +
* <code>ansible yourwebserversgroup [[-m ping]]</code>
 +
* <code>[[ios_command]]</code>
 +
[[ansible_connection:]] ansible.netcommon.[[network_cli]]
 +
ansible_network_os: ios
 +
ansible_become: yes
 +
ansible_become_method: enable
  
 
== See also ==
 
== See also ==
 
* {{ping}}
 
* {{ping}}
 
* {{Ansible}}
 
* {{Ansible}}
 +
* {{Cisco IOS}}
  
  
 
[[Category:Ansible]]
 
[[Category:Ansible]]

Latest revision as of 19:01, 20 October 2021

#!/usr/bin/env ansible-playbook

- hosts: HOSTNAME
  gather_facts: false
  connection: network_cli
  remote_user: USERNAME

  tasks:
      - ios_ping:
          dest: 10.10.10.1


TASK [ios_ping] 
****************************************************************************************************************************
fatal: [SERVER]: FAILED! => {"changed": false, "msg": "Connection type ssh is not valid for this module"}
It maybe a paramiko problem: https://github.com/ansible/ansible/issues/31699

Related terms[edit]

ansible_connection: ansible.netcommon.network_cli

ansible_network_os: ios
ansible_become: yes
ansible_become_method: enable

See also[edit]

Advertising: