Last active
March 13, 2017 13:37
-
-
Save jeffbrl/3cdff070308fa34d7ebd to your computer and use it in GitHub Desktop.
Ansible - Using Juniper.junos junos_get_config module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This task gets all Junos configuration from all devices | |
| - name: Get configuration | |
| 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: Getting config ... please wait | |
| junos_get_config: | |
| host={{ inventory_hostname }} | |
| user={{ USER }} | |
| passwd={{ PASSWORD }} | |
| dest={{ inventory_hostname }}.conf | |
| logfile=/tmp/changes.log | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment