diff --git a/EXPORT_README.md b/EXPORT_README.md index d02612d90..0a85a767b 100644 --- a/EXPORT_README.md +++ b/EXPORT_README.md @@ -14,7 +14,7 @@ This command allows exporting all available endpoints for Automation Controller pip3 install awxkit ``` -## Basic command options +## Basic command options and export methods ```console awx export --conf.host https://localhost --conf.username admin --conf.password ******** --conf.insecure --help @@ -24,18 +24,65 @@ awx export --conf.host https://localhost --conf.username admin --conf.password * awx export --conf.host https://localhost --conf.username admin --conf.password ******** --conf.insecure --job_templates ``` +```yaml +--- +- name: Export projects + hosts: localhost + connection: local + gather_facts: false + collections: + - ansible.controller + environment: + CONTROLLER_HOST: https://localhost + CONTROLLER_USERNAME: admin + CONTROLLER_PASSWORD: password + CONTROLLER_VERIFY_SSL: False + + tasks: + - name: Export projects + awx.awx.export: # or ansible.controller.export + projects: all + register: export_results + + - name: Show results + ansible.builtin.debug: + var: export_results + + - name: Export projects to file + ansible.builtin.copy: + content: "{{ export_results | to_nice_yaml( width=50, explicit_start=True, explicit_end=True) }}" + dest: projects.yaml +... +``` + ## Available options for this command |Option| |:---:| -|users| -|organizations| -|teams| -|credential_types| +|applications| |credentials| -|notification_templates| -|projects| +|credential_types| +|execution_environments| |inventory| |inventory_sources| |job_templates| +|notification_templates| +|organizations| +|projects| +|schedules| +|teams| +|users| |workflow_job_templates| + +## Limitations + +### Project export + +related signature_validation_credential is exported as a credential # not an object. + +### Workflow export related items + +related instanced groups for workflow nodes prompt on launch for job templates +related labels for workflow nodes prompt on launch for job templates + +Keep up to date with these limitations with [this awx issue](https://github.com/ansible/awx/issues/13868) diff --git a/README.md b/README.md index a107b45ab..71fa463a5 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ The input data can be organized in a very flexible way, letting the user use any ### Controller Export The awx command line can export json that is compatible with this collection. +In addition there is an awx.awx/ansible.controller export module that use the awx command line to export. More details can be found [here](EXPORT_README.md) ### Template Example