OPNsense Forum

English Forums => General Discussion => Topic started by: guest34985 on March 15, 2023, 08:06:34 PM

Title: Ansible playbook for configuration backup
Post by: guest34985 on March 15, 2023, 08:06:34 PM
Hi everyone,

I am looking for a solution to retrieve the current OPNsense configuration from an Ansible host to have a backup. For my MikroTik devices I use net_get and sftp as a protocol in a playbook.

Is it possible to trigger a configuration backup via SSH (cli) and the fetch the xml file afterwards?

Thanks and best regards
Title: Re: Ansible playbook for configuration backup
Post by: Patrick M. Hausen on March 15, 2023, 09:42:37 PM
I'd have a closer look at the os-api-backup plugin.
Title: Re: Ansible playbook for configuration backup
Post by: guest34985 on March 16, 2023, 01:03:36 PM
Thanks for the info. For now I simply fetch the /conf/config.xml via a simple Ansible playbook. But I will look into it.