Skip to content

Instantly share code, notes, and snippets.

@nmartins0611
Created August 22, 2023 09:22
Show Gist options
  • Save nmartins0611/b4e8824851b5007d3a8a1ccf398cac4b to your computer and use it in GitHub Desktop.
Save nmartins0611/b4e8824851b5007d3a8a1ccf398cac4b to your computer and use it in GitHub Desktop.
Playbook to backup Arista Config
##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