When running the filetree_create role against my AAP instance, it is failing ("Unexpected templating type error occurred...") when using the 'teams' or 'roles' input tag.
name: "Get the Authentication Token for the future requests"
ansible.builtin.uri:
url: "https://{{ controller_hostname }}/api/v2/tokens/"
user: "{{ controller_username }}"
password: "{{ controller_password }}"
method: POST
force_basic_auth: true
validate_certs: "{{ controller_validate_certs }}"
status_code: 201
register: authtoken_res
name: "Set the oauth token to be used since now"
ansible.builtin.set_fact:
controller_oauthtoken: "{{ authtoken_res.json.token }}"
controller_oauthtoken_url: "{{ authtoken_res.json.url }}"
no_log: "{{ controller_configuration_filetree_create_secure_logging | default('false') }}"
when: controller_oauthtoken is not defined
tags:
Summary
When running the filetree_create role against my AAP instance, it is failing ("Unexpected templating type error occurred...") when using the 'teams' or 'roles' input tag.
Issue Type
Ansible, Collection, Controller details
OS / ENVIRONMENT
AAP OS Version: RHEL 18.10
Desired Behavior
Role builds out file/folder structure with no failures
Actual Behavior
Please give some details of what is actually happening. Include a [minimum complete verifiable example] with:
hosts: localhost connection: local gather_facts: true
vars: controller_hostname: "ansible1mp.prci.com" controller_validate_certs: false output_path: /tmp/filetree_output input_tag: ['teams']
pre_tasks:
name: "Setup authentication (block)" block:
name: "Get the Authentication Token for the future requests" ansible.builtin.uri: url: "https://{{ controller_hostname }}/api/v2/tokens/" user: "{{ controller_username }}" password: "{{ controller_password }}" method: POST force_basic_auth: true validate_certs: "{{ controller_validate_certs }}" status_code: 201 register: authtoken_res
name: "Set the oauth token to be used since now" ansible.builtin.set_fact: controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" no_log: "{{ controller_configuration_filetree_create_secure_logging | default('false') }}" when: controller_oauthtoken is not defined tags:
always
roles:
post_tasks: