Created
August 22, 2023 09:22
-
-
Save nmartins0611/b4e8824851b5007d3a8a1ccf398cac4b to your computer and use it in GitHub Desktop.
Playbook to backup Arista Config
This file contains 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
##example | |
playbook/switch_backup.yml | |
--- | |
- name: Backup Switch | |
hosts: "{{ ansible_eda.event.switch_devices }}" | |
gather_facts: false | |
connection: httpapi | |
vars: | |
ansible_httpapi_port: 443 | |
ansible_httpapi_use_ssl: true | |
ansible_httpapi_validate_certs: false | |
tasks: | |
- name: configurable backup path | |
arista.eos.eos_config: | |
backup: yes | |
backup_options: | |
filename: "{{ ansible_eda.event.switch_devices }}.cfg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment