Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update export information #699

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 54 additions & 7 deletions EXPORT_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down