Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image RemovedImage Added

Config on the SRX:  firefly-perimeter ,  12.1X47-D20.7

set system host-name vsrx1
set system root-authentication plain-text
set system services ssh root-login allow
set system services netconf ssh
set system login user ansible class super-user
set system login user ansible authentication plain-text-password
set interfaces fxp0 unit 0 family inet address 192.168.0.12/24
set routing-options static route default next-hop 192.168.0.1


set security zones functional-zone management host-inbound-traffic system-services netconf


Netconf test:   ( user: root/juniper1 or ansible / ansible1 ) 

jlk@ubuntu:/etc/ansible$ ssh ansible@vsrx1 -p 830 -s netconf
Password:
<!-- No zombies were killed during the creation of this user interface -->
<!-- user ansible, class j-super-user -->
<hello>
  <capabilities>
    <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</capability>
    <capability>http://xml.juniper.net/netconf/junos/1.0</capability>
    <capability>http://xml.juniper.net/dmi/system/1.0</capability>
  </capabilities>
<session-id>2198</session-id>
</hello>
]]>]]>


ad hoc command:

ansible server -a "whoami"               ( server is from the inventory file: hosts )


jlk@ubuntu:~$ more /etc/ansible/hosts
[vsrx]
vsrx1
192.168.0.12

[srx300]
192.168.0.2

[server]
172.16.136.134


jlk@ubuntu:~$ ansible server -a "whoami"
172.16.136.134 | SUCCESS | rc=0 >>
jlk


jlk@ubuntu:~$ ansible server -a "ls"
172.16.136.134 | SUCCESS | rc=0 >>
cloud-ops
contrail-ansible-deployer
Desktop
Documents
Downloads
examples.desktop
Music
open-nti
Pictures
Public
snap
Templates
Videos