O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

We're going to install Ansible on our management host and then use it to connect to itself to test basic Ansible commands.

  1. First of all, we're going to install Python 2.7, since it may not be installed as the default Python interpreter in Ubuntu 16.04:
      ubuntu@ubuntu-xenial:~$ sudo apt-get install -y python2.7                     python-pip
  1. Then, we'll install Ansible using the Python package manager:
ubuntu@ubuntu-xenial:~$ pip install ansibleCollecting ansible[...]Successfully built ansible pycryptoInstalling collected packages: MarkupSafe, jinja2, PyYAML, six, pycparser, cffi, pynacl, pyasn1, bcrypt, ipaddress, idna, asn1crypto, enum34, cryptography, paramiko, pycrypto, setuptools, ansibleSuccessfully installed MarkupSafe-1.0 PyYAML-3.12 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required