Skip to content

Instantly share code, notes, and snippets.

@jeffbrl
Last active January 9, 2017 15:04
Show Gist options
  • Select an option

  • Save jeffbrl/14d6486bf08e82a64d2a91055e510848 to your computer and use it in GitHub Desktop.

Select an option

Save jeffbrl/14d6486bf08e82a64d2a91055e510848 to your computer and use it in GitHub Desktop.
junos_install_os ansible example playbook
# This task upgrades software
- name: Upgrade junos software
hosts: all
connection: local
gather_facts: no
roles:
- Juniper.junos
vars_prompt:
- name: USER
prompt: Device user
private: no
- name: PASSWORD
prompt: Device password
private: yes
tasks:
- name: upgrade
junos_install_os:
# no_copy = true does not copy image from local to /var/tmp; it must be there prior to running
# package = Assumes /var/tmp as base directory
# Note - module copies image from re0 to re1 automatically
host={{ inventory_hostname }}
user={{ USER }}
passwd={{ PASSWORD }}
version=16.1R3-S1.3
package=jinstall64-16.1R3-S1.3-domestic-signed.tgz
logfile=software.log
port=22
reboot=yes
no_copy=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment