I have AWX running as an operator on OpenShift. I need to export the templates and projects to take it to a new environment. When I try the export module, it uses the localhost
and says connection refused to localhost:443
.
When I located the Control Manager on one of the nodes, Ansible cannot SSH into it. Likely because it is a Worker Node on the Kubernetes cluster.
In this situation I am wondering how the export needs to be done?
Playbook looks as follows:
- name: Playbook to export templates
hosts: workerhostname
tasks:
- name: Export all job templates
become: yes
awx.awx.export:
job_templates: 'my_template'
credentials: 'all'
projects: 'all'
all: True
validate_certs: false
controller_host: 'https://workerhostname:443'
controller_username: 'admin'
controller_password: '<masked'
controller_oauthtoken: '<masked>'
register: export_output
- name: Save export to file
copy:
content: "{{ export_output['assets'] }}"
dest: export.json