- hosts: all gather_facts: False collections: - arubanetworks.aoscx - community.aws vars: ansible_network_os: arubanetworks.aoscx.aoscx ansible_python_interpreter: '/usr/local/bin/python3' tasks: - name: Copy Running Config to localhost as JSON aoscx_backup_config: config_name: 'running-config' output_file: '/Ansible/Backup/{{ inventory_hostname }}.json' - name: Upload JSON files to S3 s3_sync: aws_access_key: aws_secret_key: bucket: "my-s3-bucket-used-for-acx-backups" region: "us-east-1" file_root: '/Ansible/Backup/'