-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport_controller.yml
More file actions
40 lines (37 loc) · 1.28 KB
/
Copy pathexport_controller.yml
File metadata and controls
40 lines (37 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: Export Controller Assets
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Set output filename
ansible.builtin.set_fact:
output_filename: output_controller_assets.yml
- name: Export assets
awx.awx.export:
all: true
# applications: ['all']
# credential_types: ['all']
# credentials: ['all']
# execution_environments: ['all']
# inventory: ['all']
# inventory_sources: ['all']
# job_templates: ['all']
# notification_templates: ['all']
# organizations: ['all']
# projects: ['all']
# schedules: ['all']
# teams: ['all']
# users: ['all']
# workflow_job_templates: ['all']
controller_host: "{{ controller_host_src }}"
controller_username: "{{ controller_user_src }}"
controller_password: "{{ controller_pwd_src }}"
# controller_oauthtoken: "{{ controller_token_src }}"
validate_certs: false
register: export_all_results
- name: Export all assets to file {{ output_filename }}
ansible.builtin.copy:
content: "{{ export_all_results | to_nice_yaml(width=50, explicit_start=True, explicit_end=True) }}"
dest: "{{ output_filename }}"
mode: '0644'