Skip to content

Instantly share code, notes, and snippets.

@jeffbrl
Created March 16, 2017 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffbrl/818e063bcac46eaddf667a5b3da75603 to your computer and use it in GitHub Desktop.
Save jeffbrl/818e063bcac46eaddf667a5b3da75603 to your computer and use it in GitHub Desktop.
Obtaining the candidate configuration from router
# This ansible playbook gets the candidation configuration
- name: Get configuration
hosts: all
connection: local
gather_facts: no
roles:
- Juniper.junos
tasks:
- name: Getting router configs
junos_get_config:
options:
database: candidate
host: "{{ inventory_hostname }}"
dest: "/tmp/{{ inventory_hostname }}.conf"
logfile: "/tmp/{{ inventory_hostname }}.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment