Versions Compared

Key

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

...

Code Block
titlecheck python installation
sudo apt-get install python3-pip
sudo pip3 install junos-eznc
sudo python3 -m easy_install --upgrade pyOpenSSL
sudo pip3 install jxmlease





configuration file

sudo vi /etc/salt/proxy

master: 172.30.95.91

List of all proxy:

/srv/pillar/top.sls  


Code Block
titleall configs
root@saltsackmaster:/srv/pillar# more *.sls

::::::::::::::
top.sls
::::::::::::::
base:
  'srx300-1-rl102':
    - srx300-1-rl102
  'qfx5100-1-rl102':
    - qfx5100-1-rl102


::::::::::::::
qfx5100-1-rl102.sls
::::::::::::::
proxy:
  proxytype: junos
  host: 172.30.95.177
  username: Netbox
  password: Netbox
  port: 830

name: QFX5100-1-RL102



::::::::::::::
srx300-1-rl102.sls
::::::::::::::
proxy:
  proxytype: junos
  host: 172.30.95.174
  username: Netbox
  password: Netbox
  port: 830

name: SRX300-1-RL102





Code Block
titletop.sls
labuser@saltsackmaster:~$ more /srv/pillar/top.sls
base:
  'fw1_proxy':
    - mx


list of all Devices

/srv/pillar/mx.sls


Code Block
titlemx.sls
labuser@saltsackmaster:~$ more /srv/pillar/mx.sls
proxy:
  proxytype: junos
  host: 172.30.95.174
  username: Netbox
  password: Netbox
  port: 830

name: SRX300-1-RL102


start the salt proxy 

in debug mode to check that everything is ok:

sudo salt-proxy --proxyid=fw1_proxy -l debug

then in deamon mode



Accept the salt-key

sudo salt-key -L

sudo salt-key -a fw1_proxy

test sudo salt 'fw1_proxy' test.ping
get factssudo salt 'fw1_proxy' junos.facts
grainssudo salt 'fw1_proxy' grains.




...