1- Install Ansible on windows/Bash , Linux (VMware-Virtualbox ) , Cygwin
Use a container ( + PyEZ)
Install juniper/pyez-ansible Docker image
Ubuntu Desktop 17.1: ( JLK in VMware ) | |
MobaXterm 9.4 | |
Cygwin: | |
Windows 10 bash ( ubuntu) | https://www.how2shout.com/how-to/how-to-install-ansible-on-windows-10.html Windows 10 bash ( ubuntu) 1- run bash as root ( in a normal cmd.exe type "lxrun /setdefaultuser root /y") original user was: onmylaptop https://docs.microsoft.com/en-us/windows/wsl/user-support 2- update and install sudo apt-get update sudo apt-get install software-properties-common sudo apt-add-repository ppa:ansible/ansible #did not work# ping google.com to check internet connection sudo apt-get update sudo apt-get install ansible check: ansible --version 3- Install the python library: PyEZ , jxmlease , nnclient pip install junos-eznc pip install ncclient pip install jxmlease jlk@jkriker-T460:~$ pip list ansible (2.7.7) junos-eznc (2.2.0) jxmlease (1.0.1) paramiko (2.4.2) 4- Install the ansible role: Juniper.junos jlk@jkriker-T460:/etc/ansible/roles$ ansible-galaxy install Juniper.junos - downloading role 'junos', owned by Juniper - downloading role from https://github.com/Juniper/ansible-junos-stdlib/archive/2.1.0.tar.gz - extracting Juniper.junos to /home/jlk/.ansible/roles/Juniper.junos - Juniper.junos (2.1.0) was installed successfully 5- Usage: ansible windows -m win_ping 7- change ( or mount this directory ) cd /mnt/c/Users/jkriker/Documents/GitHub/ |
Basic test ansible --version | |