Last active
June 2, 2017 13:23
-
-
Save jeffbrl/57ef044eafc1b6367746 to your computer and use it in GitHub Desktop.
Ansible - Using Juniper.junos junos_install_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 pushes Junos config files to 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: Pushing configs... | |
| junos_install_config: | |
| host={{ inventory_hostname }} | |
| user={{ USER }} | |
| port=22 | |
| passwd={{ PASSWORD }} | |
| file=configs/{{ inventory_hostname }}.conf | |
| overwrite=yes | |
| logfile=/tmp/changes.log | |
| comment="commited by ansible" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment