[ansible-project] Re: Ansible : get running config from aruba switches
Log in ansible : 2018-04-13 15:26:16,799 p=4956 u=mchavigny | ansible 2.5.0 (stable-2.5 955ef020ef) last updated 2018/04/12 16:44:14 (GMT +200) config file = /opt/ansible/ansible.cfg configured module search path = [u'/opt/ansible/library'] ansible python module location = /opt/ansible/lib/ansible executable location = /opt/ansible/bin/ansible python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0] 2018-04-13 15:26:16,799 p=4956 u=mchavigny | Using /opt/ansible/ansible.cfg as config file 2018-04-13 15:26:16,800 p=4956 u=mchavigny | setting up inventory plugins 2018-04-13 15:26:16,926 p=4956 u=mchavigny | Parsed swautc02, inventory source with host_list plugin 2018-04-13 15:26:19,696 p=4956 u=mchavigny | Loading callback plugin minimal of type stdout, v2.0 from /opt/ansible/lib/ansible/plugins/callback/minimal.pyc 2018-04-13 15:26:22,368 p=4956 u=mchavigny | META: ran handlers 2018-04-13 15:26:35,095 paramiko.transport starting thread (client mode): 0xfd7283d0L 2018-04-13 15:26:35,096 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.4.1 2018-04-13 15:26:35,097 paramiko.transport Remote version/idstring: SSH-2.0-Mocana SSH 6.3 2018-04-13 15:26:35,097 paramiko.transport Connected (version 2.0, client Mocana) 2018-04-13 15:26:35,108 paramiko.transport kex algos:[u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-...@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc', u'3des-cbc'] server encrypt:[u'aes256-ctr', u'aes256-cbc', u'rijndael-...@lysator.liu.se', u'aes192-ctr', u'aes192-cbc', u'aes128-ctr', u'aes128-cbc', u'3des-cbc'] client mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] server mac:[u'hmac-sha1-96', u'hmac-md5', u'hmac-sha1', u'hmac-md5-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False 2018-04-13 15:26:35,108 paramiko.transport Kex agreed: diffie-hellman-group14-sha1 2018-04-13 15:26:35,109 paramiko.transport HostKey agreed: ssh-rsa 2018-04-13 15:26:35,109 paramiko.transport Cipher agreed: aes128-ctr 2018-04-13 15:26:35,109 paramiko.transport MAC agreed: hmac-sha1 2018-04-13 15:26:35,110 paramiko.transport Compression agreed: none 2018-04-13 15:26:35,542 paramiko.transport kex engine KexGroup14 specified hash_algo 2018-04-13 15:26:35,543 paramiko.transport Switch to new keys ... 2018-04-13 15:26:35,582 paramiko.transport Trying discovered key 931806b200d37ba37c23ed0f745877c3 in /opt/ansible/bkpkey.key 2018-04-13 15:26:35,750 paramiko.transport userauth is OK 2018-04-13 15:26:35,840 paramiko.transport Auth banner: We'd like to keep you up to date about: * Software feature updates * New product announcements * Special events Please register your products now at: www.hpe.com/networking/register 2018-04-13 15:26:35,892 paramiko.transport Authentication (publickey) successful! 2018-04-13 15:26:35,896 paramiko.transport [chan 0] Max packet in: 32768 bytes 2018-04-13 15:26:35,942 paramiko.transport [chan 0] Max packet out: 32768 bytes 2018-04-13 15:26:35,942 paramiko.transport Secsh channel 0 opened. 2018-04-13 15:26:36,047 paramiko.transport [chan 0] Sesch channel 0 request ok 2018-04-13 15:26:36,153 paramiko.transport [chan 0] Sesch channel 0 request ok 2018-04-13 15:26:46,678 p=160 u=mchavigny | shutdown complete 2018-04-13 15:26:46,693 paramiko.transport EOF in transport thread 2018-04-13 15:26:46,764 p=4956 u=mchavigny | The full traceback is: Traceback (most recent call last): File "/usr/bin/ansible-connection", line 70, in start self.connection._connect() File "/opt/ansible/lib/ansible/plugins/connection/network_cli.py", line 316, in _connect self.receive() File "/opt/ansible/lib/ansible/plugins/connection/network_cli.py", line 391, in receive data = self._ssh_shell.recv(256) File "/usr/lib/python2.7/site-packages/paramiko/channel.py", line 685, in recv raise socket.timeout() timeout 2018-04-13 15:26:46,772 p=4956 u=mchavigny | swautc02 | FAILED! => { "msg": "" } Le vendredi 13 avril 2018 13:12:40 UTC+2, Martial CHAVIGNY a écrit : > > Hello, > > I'm new user of ansible and for the first projet, I would to get current > config of aruba (2930F) switches (for backup). > > I read these documentations : > > > https://docs.ansible.com/ansible/devel/network/getting_started/first_playbook.html > https://docs.ansible.com/ansible/2.4/aruba_config_module.html > > For the debug, I test with this commande : > > ansible all -i swautc02, -c network_cli -u manager -m aruba_config -e > ansible_network_os=aruba - --private-key=bkpkey.key > > but return : > > ansible 2.5.0 (stable-2.5 955ef020ef) last updated 2018/04/12 16:44:14 >> (GMT +200) >> config file = /opt/ansible/ansible.cfg >> configured module search path = [u'/opt/ansible/library'] >> ansible python module location = /opt/ansible/lib/ansible >> executable location
[ansible-project] Re: Ansible : get running config from aruba switches
Log in /var/log/ansible : 2018-04-13 15:22:22,108 p=2296 u=mchavigny | ansible 2.5.0 (stable-2.5 > 955ef020ef) last updated 2018/04/12 16:44:14 (GMT +200) > config file = /opt/ansible/ansible.cfg > configured module search path = [u'/opt/ansible/library'] > ansible python module location = /opt/ansible/lib/ansible > executable location = /opt/ansible/bin/ansible > python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0] > 2018-04-13 15:22:22,108 p=2296 u=mchavigny | Using > /opt/ansible/ansible.cfg as config file > 2018-04-13 15:22:29,129 p=2296 u=mchavigny | setting up inventory plugins > 2018-04-13 15:22:29,474 p=2296 u=mchavigny | Parsed 172.25.0.56, > inventory source with host_list plugin > 2018-04-13 15:22:33,726 p=2296 u=mchavigny | Loading callback plugin > minimal of type stdout, v2.0 from > /opt/ansible/lib/ansible/plugins/callback/minimal.pyc > 2018-04-13 15:22:36,913 p=2296 u=mchavigny | META: ran handlers > 2018-04-13 15:22:52,906 paramiko.transport starting thread (client mode): > 0xfd7283d0L > 2018-04-13 15:22:52,908 paramiko.transport Local version/idstring: > SSH-2.0-paramiko_2.4.1 > 2018-04-13 15:22:56,012 paramiko.transport Remote version/idstring: > SSH-2.0-OpenSSH_3.7.1p2 > 2018-04-13 15:22:56,012 paramiko.transport Connected (version 2.0, client > OpenSSH_3.7.1p2) > 2018-04-13 15:22:56,025 paramiko.transport kex > algos:[u'diffie-hellman-group-exchange-sha1', > u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa'] client > encrypt:[u'des', u'3des-cbc'] server encrypt:[u'des', u'3des-cbc'] client > mac:[u'hmac-md5', u'hmac-sha1', u'hmac-ripemd160', > u'hmac-ripemd...@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] server > mac:[u'hmac-md5', u'hmac-sha1', u'hmac-ripemd160', > u'hmac-ripemd...@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] client > compress:[u'none'] server compress:[u'none'] client lang:[u''] server > lang:[u''] kex follows?False > 2018-04-13 15:22:56,025 paramiko.transport Kex agreed: > diffie-hellman-group-exchange-sha1 > 2018-04-13 15:22:56,025 paramiko.transport HostKey agreed: ssh-rsa > 2018-04-13 15:22:56,026 paramiko.transport Cipher agreed: 3des-cbc > 2018-04-13 15:22:56,026 paramiko.transport MAC agreed: hmac-sha1 > 2018-04-13 15:22:56,026 paramiko.transport Compression agreed: none > 2018-04-13 15:22:56,541 paramiko.transport Got server p (2048 bits) > 2018-04-13 15:22:57,595 paramiko.transport kex engine KexGex specified > hash_algo > 2018-04-13 15:22:57,604 paramiko.transport Switch to new keys ... > 2018-04-13 15:22:57,639 paramiko.transport userauth is OK > 2018-04-13 15:22:58,035 paramiko.transport Authentication (password) > successful! > 2018-04-13 15:22:58,043 paramiko.transport [chan 0] Max packet in: 32768 > bytes > 2018-04-13 15:22:58,063 paramiko.transport [chan 0] Max packet out: 32768 > bytes > 2018-04-13 15:22:58,064 paramiko.transport Secsh channel 0 opened. > 2018-04-13 15:22:58,081 paramiko.transport [chan 0] Sesch channel 0 > request ok > 2018-04-13 15:22:58,107 paramiko.transport [chan 0] Sesch channel 0 > request ok > 2018-04-13 15:23:08,362 p=10660 u=mchavigny | shutdown complete > 2018-04-13 15:23:08,447 paramiko.transport EOF in transport thread > 2018-04-13 15:23:08,450 p=2296 u=mchavigny | The full traceback is: > Traceback (most recent call last): > File "/usr/bin/ansible-connection", line 70, in start > self.connection._connect() > File "/opt/ansible/lib/ansible/plugins/connection/network_cli.py", line > 316, in _connect > self.receive() > File "/opt/ansible/lib/ansible/plugins/connection/network_cli.py", line > 391, in receive > data = self._ssh_shell.recv(256) > File "/usr/lib/python2.7/site-packages/paramiko/channel.py", line 685, > in recv > raise socket.timeout() > timeout > 2018-04-13 15:23:08,457 p=2296 u=mchavigny | 172.25.0.56 | FAILED! => { > "msg": "" > } Le vendredi 13 avril 2018 13:12:40 UTC+2, Martial CHAVIGNY a écrit : > > Hello, > > I'm new user of ansible and for the first projet, I would to get current > config of aruba (2930F) switches (for backup). > > I read these documentations : > > > https://docs.ansible.com/ansible/devel/network/getting_started/first_playbook.html > https://docs.ansible.com/ansible/2.4/aruba_config_module.html > > For the debug, I test with this commande : > > ansible all -i swautc02, -c network_cli -u manager -m aruba_config -e > ansible_network_os=aruba - --private-key=bkpkey.key > > but return : > > ansible 2.5.0 (stable-2.5 955ef020ef) last updated 2018/04/12 16:44:14 >> (GMT +200) >> config file = /opt/ansible/ansible.cfg >> configured module search path = [u'/opt/ansible/library'] >> ansible python module location = /opt/ansible/lib/ansible >> executable location = /opt/ansible/bin/ansible >> python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0] >> Using /opt/ansible/ansible.cfg as config file >> setting up inventory plugins >> Parsed swautc02, inventory source wi