You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using AWX 23.7.0
In my playbook, I create an auth token and assign controller_oauthtoken and controller_oauthtoken_url then import infra.controller_configuration.filetree_create
I also have controller_api_plugin set to awx.awx.controller_api
my import_role task imports infra.controller_configuration.filetree_create
Inside that role, when it calls the task:
The task is failing with: "msg": "the field 'args' has an invalid value ({'aap_version': "{{ lookup(controller_api_plugin, 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version }}"}), and could not be converted to an dict.The error was: unmarshallable object\n\nThe error appears to be in '/usr/share/ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create/tasks/all.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: "Get the Tower/AAP instance version"\n ^ here\n",
I am successful if I create a fact the same way the infra role is calling awx.awx.controller_api with: lookup('awx.awx.controller_api', 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version }}
ansible installation method: EE based upon quay.io/centos/centos:stream9-minimal
OS / ENVIRONMENT
CentOS Stream 9
Desired Behavior
filetree_create collects my information from AWX Server
Actual Behavior
TASK [infra.controller_configuration.filetree_create : Include Tasks to get all objects of type ['labels']] ***
task path: /usr/share/ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create/tasks/main.yml:48
included: /usr/share/ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create/tasks/all.yml for localhost
TASK [infra.controller_configuration.filetree_create : Get the Tower/AAP instance version] ***
task path: /usr/share/ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create/tasks/all.yml:2
fatal: [localhost]: FAILED! => {
"msg": "the field 'args' has an invalid value ({'aap_version': \"{{ lookup(controller_api_plugin, 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version }}\"}), and could not be converted to an dict.The error was: unmarshallable object\n\nThe error appears to be in '/usr/share/ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create/tasks/all.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: \"Get the Tower/AAP instance version\"\n ^ here\n"
}
Summary
I'm using AWX 23.7.0
In my playbook, I create an auth token and assign controller_oauthtoken and controller_oauthtoken_url then import infra.controller_configuration.filetree_create
I also have controller_api_plugin set to awx.awx.controller_api
my import_role task imports infra.controller_configuration.filetree_create
Inside that role, when it calls the task:
ansible.builtin.set_fact:
aap_version: "{{ lookup(controller_api_plugin, 'ping',
host=controller_hostname, oauth_token=controller_oauthtoken,
verify_ssl=controller_validate_certs).version }}"
The task is failing with: "msg": "the field 'args' has an invalid value ({'aap_version': "{{ lookup(controller_api_plugin, 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version }}"}), and could not be converted to an dict.The error was: unmarshallable object\n\nThe error appears to be in '/usr/share/ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create/tasks/all.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: "Get the Tower/AAP instance version"\n ^ here\n",
I am successful if I create a fact the same way the infra role is calling awx.awx.controller_api with: lookup('awx.awx.controller_api', 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version }}
Issue Type
Ansible, Collection, Controller details
OS / ENVIRONMENT
CentOS Stream 9
Desired Behavior
filetree_create collects my information from AWX Server
Actual Behavior
STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: