Hello and thanks for th help. I have some measure of sucesss
With the Trial redhat AAP. I get the same issue with the open source AWX-operator.
I am trying to crated a job template using “ansible.controller.job_template” - Red hat AAP or
“awx.awx.job_templ.ate” AWX Operator
I got the code sample from:
https://github.com/network-automation/toolkit/blob/master/playbooks/network_backup.yml
I have solved the “run once” issue - it works alphabetically! my hosts are backup-server and network.
The “make template” task code is code is this:
- name: create restore job template
ansible.controller.job_template:
name: “Network Automation - Restore”
job_type: “run”
inventory: “{{ restore_inventory|default(‘Network Inventory’) }}”
project: “{{ restore_project|default(‘Network Toolkit’) }}”
playbook: “{{ restores_playbook|default(‘playbooks/network_restore.yml’) }}”
credential: “{{ restore_credential|default(‘Network Credential’) }}”
survey_enabled: true
survey_spec: “{{ lookup(‘template’, ‘{{ playbook_dir }}/…/network_setup/templates/backup.j2’) }}”
validate_certs: no
execution_environment: “Default execution environment”
run_once: true
The task works to a point - all the json code is fine, the error text show all the right data for backup files, etc . BUT the execution environment ALWAYS errors out with this error:
“msg”: “The requested object could not be found at /api/v2/execution_environments/.”,
If I comment out the execution_environment line, I get the same error, but this time for “job_template”, if I add a line for “organzation” I get the same message but this time for /api/v2/organizations…The code works through, and the survy_spec gets the correct results, etc. but no template gets created the “backup-server” and the controller_host are the same box.
Any Ideas on what I might be missing? Same problem with the Red Hat Trial, and the awx-operator,
thanks
ewholz