-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Summary
If I create the template in the GUI I am able to access the survey. The issue is when we create the template using Ansible and the infra.controller_configuration collection. When the playbook creates the template we are not able to see the survey in the GUI i to make changes. If I launch the template it does show the survey to answer. I did open a ticket with Redhat and they are having the same issue. I was told to open an issue here.
Issue Type
- Bug Report
Ansible, Collection, Controller details
ansible --version
ansible-galaxy collection list
infra.controller_configuration
Controller version
Red Hat Ansible Automation Platform
2.4
- ansible installation method: one of source, pip, OS package, EE
OS / ENVIRONMENT
Desired Behavior
Actual Behavior
Please give some details of what is actually happening.
Include a [minimum complete verifiable example] with:
The following is the error we get in the GUI:
TypeError: Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length') at Fle (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:3037132) at ao (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:831448) at Ks (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:883792) at Al (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:871038) at Tl (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:870966) at El (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:870829) at yl (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:867795) at https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:817240 at t.unstable_runWithPriority (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:913546) at Gi (https://ansiblecontroller-dev.company.com/static/js/main.359f10ea.js:2:817017)
The playbook runs successfully.
The following is in the main playbook.
roles:
- {role: infra.controller_configuration.job_templates, when: controller_templates is defined}
- name: Create job
ansible.builtin.include_role:
name: infra.controller_configuration.job_templates
vars:
controller_templates: "{{ data }}"
no_log: false
The following is the .project file:
- name: OnPrem-Server-Teardown-Manual-Test
credentials:
- serviceuser1
- OnpremServerBuild-vault
project: OS-Build-jctesting
inventory: Localhost Automation
execution_environment: ee-serverbuild-automation
playbook: teardown-new.yml
organization: GBSAuto
extra_vars: {
InfobloxBaseUri: "https://ansiblecontroller.company.com/",
infoblox_job_template_id: 401
}
survey_enabled: true
survey_spec: {
name: "Teardown Server",
description: "This survey will gather information needed to teardown a server",
spec: [
{
type: "multiselect",
"min": 0,
"max": 0,
question_name: "Which tasks to run?",
question_description: " ",
variable: "teardown_options",
choices: ["all", "remove_dns", "poweroff_vm", "delete_vm", "remove_satellite", "remove_computer_AD", "remove_winaccess", "remove_sccm"],
required: true
},
{
type: "multiplechoice",
"min": 0,
"max": 0,
question_name: "Is this a virtual server?",
question_description: " ",
variable: "virtual",
choices: ["yes", "no"],
required: true
},
{
type: "text",
question_name: "Server Name",
question_description: " ",
variable: "vm",
"min": 0,
"max": 20,
required: true
},
{
type: "multiplechoice",
"min": 0,
"max": 0,
question_name: "Site",
question_description: " ",
required: true,
variable: "site",
choices: ["SITE1", "SITE2"]
},
{
type: "multiplechoice",
"min": 0,
"max": 0,
question_name: "Domain",
question_description: " ",
required: true,
variable: "domain",
choices: ["domain1.com", "domain2.com", "domain3.com"]
},
{
type: "multiplechoice",
"min": 0,
"max": 0,
question_name: "Environment",
question_description: " ",
required: true,
variable: "env",
choices: ["prod", "dev", "sandbox"]
}
]
}
- playbook / task
- configuration file / list
- error
STEPS TO REPRODUCE
The playbook runs successfully and the template does get created in AAP. You just can't view or change the survey. The Web interface shows There was an error loading this content. Please reload the page.
You are able to launch the template and the survey does show up. You just can't do any manual updates to it.