When i take the output file from the export playbook below, and pass it into the import playbook below, the job run fails immediately with the following message:
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Failed to import assets argument of type ‘NoneType’ is not iterable”}
Note - this happens whether i export a single resource type or the all the resource types. It doesn’t matter.
The input file looks well formed and i can see no issues with it. There is no other information available regarding the error.
I am running both systems on Ubuntu using K3s as the kubernettes engine.
Happy to provide any more information you may need. Any help would be huge at this point,
Export
- name: Export all
awx.awx.export:
controller_host: ‘{{ old_host}}’
validate_certs: false
controller_username: ‘{{ my_user}}’
controller_password: ‘{{ my_password }}’
all: true
register: export_all
delegate_to: localhost
- name: Save export to file
copy:
content: "{{ export_all | to_nice_yaml(indent=2) }}"
dest: “{{my_output_file}}”
delegate_to: localhost
Import
- name: Include vars from assets_file_to_import
ansible.builtin.include_vars:
file: “{{my_output_file}}”
- name: Import all exported assets
awx.awx.import:
controller_host: ‘{{ new_host}}’
validate_certs: false
controller_username: ‘{{ my_user}}’
controller_password: ‘{{ my_password }}’
assets: "{{ assets }}"
register: import_output
delegate_to: localhost