-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Description
Summary
When running the infra.controller_configuration.filetree_create role, I am getting the following error message.
TASK [infra.controller_configuration.filetree_create : Check if the required input values are correct] ***************************************************************************************************************
ok: [localhost] => (item=labels)
ok: [localhost] => (item=inventory)
ok: [localhost] => (item=credentials)
ok: [localhost] => (item=credential_types)
ok: [localhost] => (item=notification_templates)
ok: [localhost] => (item=organizations)
ok: [localhost] => (item=projects)
ok: [localhost] => (item=job_templates)
ok: [localhost] => (item=workflow_job_templates)
failed: [localhost] (item=workflow_job_template_nodes) => {"ansible_loop_var": "tag_item", "assertion": "tag_item in valid_tags", "changed": false, "evaluated_to": false, "msg": "Received tags are not valid: workflow_job_template_nodes. The valid tags are the following ones: all, settings, credentials, credential_types, execution_environments, groups, hosts, inventory, inventory_sources, job_templates, notification_templates, organizations, projects, roles, teams, users, workflow_job_templates, instance_groups, applications, labels, schedules. The list of the received tags is: ['labels', 'inventory', 'credentials', 'credential_types', 'notification_templates', 'organizations', 'projects', 'job_templates', 'workflow_job_templates', 'workflow_job_template_nodes', 'schedules', 'execution_environments']", "tag_item": "workflow_job_template_nodes"}
ok: [localhost] => (item=schedules)
ok: [localhost] => (item=execution_environments)
The documentation lists that workflow_job_template_nodes is a valid option but the verification that the role performs for valid input tags is failing.
Issue Type
- Bug Report
Ansible, Collection, Controller details
ansible [core 2.16.14]
config file = /tmp/tmp.NXnl2rPRRP/creation/ansible.cfg
configured module search path = ['/home/mmitschk/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/mmitschk/Tools/ansible/ansible-2.16/lib64/python3.12/site-packages/ansible
ansible collection location = /tmp/tmp.NXnl2rPRRP/creation/collections
executable location = /home/mmitschk/Tools/ansible/ansible-2.16/bin/ansible
python version = 3.12.11 (main, Jun 12 2025, 00:00:00) [GCC 14.3.1 20250523 (Red Hat 14.3.1-1)] (/home/mmitschk/Tools/ansible/ansible-2.16/bin/python3.12)
jinja version = 3.1.4
libyaml = True
$ ansible-galaxy collection list
# /tmp/tmp.NXnl2rPRRP/creation/collections/ansible_collections
Collection Version
------------------------------ -------
ansible.controller 4.5.24
ansible.posix 2.1.0
community.general 11.2.1
containers.podman 1.17.0
infra.controller_configuration 3.1.3
-
Controller Version: 4.5.24
-
ansible installation method: pip
OS / ENVIRONMENT
- Red Hat Enterprise Linux 9
- Ansible Automation Platform 2.4
Desired Behavior
Be able to specify workflow_job_template_nodes as an option for input tags
Actual Behavior
Getting the above error message.
STEPS TO REPRODUCE
---
- name: Example Playbook
hosts: all
gather_facts: "{{ gather_facts | default(False) }}"
# module_defaults:
# group/ansible.controller.controller:
# controller_host: ''
# controller_username: admin
# controller_password: admin
# validate_certs: false
tasks:
- name: Include variables from vars/controller
ansible.builtin.include_vars:
dir: "{{ playbook_dir }}/vars/controller"
ignore_files: ["random.yaml"]
extensions: ["yml"]
ignore_unknown_extensions: true
- name: Delete resources in reverse order
ansible.builtin.import_role:
name: infra.controller_configuration.dispatch
- name: Export Automation Controller Resources
hosts: all
gather_facts: "{{ gather_facts | default(False) }}"
vars:
filetree_output_path: "{{ playbook_dir + '/../filetree' }}"
controller_hostname: ''
controller_username: admin
controller_password: admin
controller_validate_certs: false
tasks:
- name: Create {{ filetree_output_path }}
loop: ['absent', 'directory']
ansible.builtin.file:
path: "{{ filetree_output_path }}"
state: "{{ item }}"
- name: Create OAuth2 token
register: authtoken_res
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
- 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 }}"
- name: Export resources
vars:
output_path: "{{ filetree_output_path }}"
input_tag:
- labels
- inventory
- credentials
- credential_types
- notification_templates
- organizations
- projects
- job_templates
- workflow_job_templates
- workflow_job_template_nodes
- schedules
- execution_environments
ansible.builtin.import_role:
name: infra.controller_configuration.filetree_create
---
controller_organizations:
- name: New Org
###
### Custom Credential Type
###
controller_credential_types:
- name: Custom OpenStack Credentials
description: Credential type used for connecting to OpenStack
inputs:
fields:
- id: _openstack_auth_url
label: OpenStack Authentication URL
type: string
- id: _openstack_project_id
label: OpenStack Project ID
type: string
- id: _openstack_project_name
label: OpenStack Project Name
type: string
- id: _openstack_user_domain
label: OpenStack User Domain
type: string
- id: _openstack_credential_id
label: OpenStack Application ID
type: string
secret: true
- id: _openstack_credential_secret
label: OpenStack Application Password
type: string
secret: true
required:
- _openstack_auth_url
injectors:
extra_vars:
openstack_auth_url: !unsafe "{{ _openstack_auth_url }}"
openstack_project_id: !unsafe "{{ _openstack_project_id }}"
openstack_project_name: !unsafe "{{ _openstack_project_name }}"
openstack_user_domain: !unsafe "{{ _openstack_user_domain }}"
openstack_credential_id: !unsafe "{{ _openstack_credential_id }}"
openstack_credential_secret: !unsafe "{{ _openstack_credential_secret }}"
- name: Custom Red Hat SSO Credentials
description: Credential type used for connecting to Red Hat SSO
inputs:
fields:
- id: _rhsso_token_url
label: Red Hat SSO Token URL
type: string
- id: _rhsso_token
label: Red Hat SSO Offline Access Token
type: string
secret: true
required:
- _rhsso_token_url
injectors:
extra_vars:
rh_sso_token_url: !unsafe "{{ _rhsso_token_url }}"
rh_sso_token: !unsafe "{{ _rhsso_token }}"
offline_token: !unsafe "{{ _rhsso_token }}"
###
### Required Credentials
###
controller_credentials:
- name: OpenStack Server
organization: New Org
credential_type: Source Control
state: present
inputs:
username: cloud-user
password: cloud-user
###
### Required inventories
###
controller_inventories:
- name: Local
organization: New Org
###
### Requires hosts for inventories
###
controller_inventory_hosts:
- name: localhost
inventory: Local
enabled: true
variables:
ansible_host: 127.0.0.1
ansible_connection: local
ansible_python_interpreter: !unsafe "{{ ansible_playbook_python }}"
###
### Required projects
###
controller_projects:
- name: Example Project
organization: New Org
scm_url: https://github.com/demonpig/aap-example-project
scl_clean: true
scm_type: git
wait: true
###
### Required job templates
###
controller_templates:
- name: Ping
job_type: run
inventory: Local
organization: New Org
project: Example Project
playbook: playbooks/ping.yml
allow_simultaneous: true
- name: Long
job_type: run
inventory: Local
organization: New Org
project: Example Project
playbook: playbooks/long.yml
allow_simultaneous: true
- name: Fail
job_type: run
inventory: Local
organization: New Org
project: Example Project
playbook: playbooks/fail.yml
allow_simultaneous: true
###
### Required workflow templates
###
controller_workflows:
- name: child-workflow-1
organization: New Org
allow_simultaneous: true
workflow_nodes:
- identifier: node101
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node102
- identifier: node102
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node103
- identifier: node103
unified_job_template:
name: Ping
type: job_template
- name: child-workflow-2
organization: New Org
allow_simultaneous: true
workflow_nodes:
- identifier: node101
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node102
- identifier: node102
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node103
- identifier: node103
unified_job_template:
name: Ping
type: job_template
- name: child-workflow-3
organization: New Org
allow_simultaneous: true
workflow_nodes:
- identifier: node101
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node102
- identifier: node102
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node103
- identifier: node103
unified_job_template:
name: Ping
type: job_template
- name: child-workflow-4
organization: New Org
allow_simultaneous: true
workflow_nodes:
- identifier: node101
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node102
- identifier: node102
unified_job_template:
name: Ping
type: job_template
related:
always_nodes:
- identifier: node103
- identifier: node103
unified_job_template:
name: Ping
type: job_template
- name: parent-workflow
organization: New Org
allow_simultaneous: true
workflow_nodes:
- identifier: node101-1
unified_job_template:
name: child-workflow-1
type: workflow_job_template
related:
always_nodes:
- identifier: node102
- identifier: node101-2
unified_job_template:
name: child-workflow-1
type: workflow_job_template
related:
always_nodes:
- identifier: node102
- identifier: node101-3
unified_job_template:
name: child-workflow-3
type: workflow_job_template
related:
always_nodes:
- identifier: node102
- identifier: node101-4
unified_job_template:
name: child-workflow-4
type: workflow_job_template
related:
always_nodes:
- identifier: node102
- identifier: node102
unified_job_template:
name: child-workflow-2
type: workflow_job_template
related:
always_nodes:
- identifier: node103
- identifier: node103
unified_job_template:
name: child-workflow-3
type: workflow_job_template
related:
always_nodes:
- identifier: node104
- identifier: node104
unified_job_template:
name: child-workflow-4
type: workflow_job_template