fortinet-ansible-dev / ansible-galaxy-fortiswitch-collection

GNU General Public License v3.0
2 stars 0 forks source link

is there anyway i can download all config #1

Closed teamsmiley closed 1 year ago

teamsmiley commented 2 years ago

is there anyway i can download all config

JieX19 commented 2 years ago

Hi @teamsmiley

Sure. We have a module called 'backup full config' to download all configs at once.

This is the FAQ link in which you can find examples for this module. https://ansible-galaxy-fortiswitch-docs.readthedocs.io/en/galaxy-1.1.0/faq.html

I hope this helps, but let me know if you have any questions.

teamsmiley commented 2 years ago

ERROR! couldn't resolve module/action 'fortiswitch_execute_backup_default_config'. This often indicates a misspelling, missing collection, or incorrect module path.

i get this error . i installed collection already

do you have any idea?

teamsmiley commented 2 years ago

oh 1.1.0 work. but i dont get any output.

teamsmiley commented 2 years ago
- name: "Backup Switch's Full Configuration"
      fortiswitch_execute_backup_full_config:
        enable_log: yes
        execute_backup_full_config:
          config: default

    - name: "default config backup"
      fortiswitch_execute_backup_default_config:
        enable_log: yes
        execute_backup_default_config:
          config: test
teamsmiley commented 2 years ago

what is config?

teamsmiley commented 2 years ago
image
JieX19 commented 2 years ago

@teamsmiley

Did you try the latest version 1.1.0? ansible-galaxy collection install fortinet.fortiswitch:1.1.0

You will get the results as follows: config

You can use Ansible modules 'register' and 'copy' to save the backup info.
FYI, we have an example of using 'register' and 'copy' modules. https://ansible-galaxy-fortios-docs.readthedocs.io/en/latest/faq.html,