Skip to content

Commit

Permalink
update export information
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan committed Sep 27, 2023
1 parent 20b7bb7 commit 78c330c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 7 deletions.
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

0 comments on commit 78c330c

Please sign in to comment.