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
"msg": "Unable to create schedule helix_test: {'verbosity': ['Field is not configured to prompt on launch.'], 'extra_data': ['Variables scheduled are not allowed on launch. Check the Prompt on Launch setting on the Job Template to include Extra Variables.']}"
Once the schedule is created, you can set these back to false, which is a work around.
Note that we have variables defined in the inventory resource.
So the question is why do schedules need these settings, when we don't want to set them? Are we using this incorrectly or miss understanding something? We should be able to set these to false?
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:
playbook / task
configuration file / list
error
STEPS TO REPRODUCE
---
controller_projects:
# Schedules cannot differentiate between a project and template named the same (eg helix_test), returns 2 items and fails. Thus helix_test Project.
- name: helix_test Projectorganization: Infrastructure_Servicesscm_branch: INS-000/helix-testscm_type: gitscm_update_on_launch: truescm_url: https://gitlab.com/genomicsengland/infra_services/config_mgt/ansible/cluster-double-helix.gitcredential: "GEL Gitlab - ansible read"notification_templates_error: Slack ansible_alerts
---
controller_templates:
- name: helix_testjob_type: runorganization: Infrastructure_Servicesinventory: helix_testproject: helix_test Projectexecution_environment: Automation Hub Default execution environmentplaybook: site.ymlcredentials:
- helix_testinstance_groups:
- ansible_devverbosity: 0become_enabled: truenotification_templates_error: Slack ansible_alerts# next two settings will need to be set to be set temporarily to true to allow the schedule to be created. # Once created, these can then be set to false, which is what we want.ask_variables_on_launch: falseask_verbosity_on_launch: false
---
controller_inventories:
- name: helix_testorganization: Infrastructure_Servicesvariables:
ansible_connection: sshansible_user: ansibleansible_become_user: root
---
controller_schedules:
- name: helix_testorganization: Infrastructure_Servicesdescription: Run helix_test template on a schedule so we are alerted when AAP has issue running jobsunified_job_template: helix_testrrule: "DTSTART:20240721T000000Z RRULE:FREQ=HOURLY;INTERVAL=4"extra_data:
scheduled: trueverbosity: 1
The text was updated successfully, but these errors were encountered:
This is by design. The schedule needs to be able to apply the item to the job template so it does need to have prompt on launch for the things you're setting.
Because you're trying to set extra_data and verbosity on the schedule, you're trying to set these items as though they've been prompted for.
You'll find the same behaviour if you try to create through the API or in the UI that you can't apply those options unless they're set to be prompted on launch. I suspect (though haven't tried) that if you disable the prompt_on_launch_XXX, then the overridden values will not actually be set during the schedule.
I'm going to close this as it's not really something which this collection can assist with and it's more of an 'issue' with Controller itself.
For anyone who followed the example in the collection documentation, this is a simple example that does not cause the issue I experienced (which expects template non default values).
---
controller_schedules:
- name: helix_test
organization: Infrastructure_Services
description: Run helix_test template on a schedule so we are alerted when AAP has issue running jobs
unified_job_template: helix_test
rrule: "DTSTART:20240721T000000Z RRULE:FREQ=HOURLY;INTERVAL=4"
@Tompage1994 might I suggest a documentation update to have a simple example like above? As someone new to automation controller I would not know what all the settings are and would use the example in the documentation as a starting point. BTW many thanks for your help!
Summary
When creating a schedule for the first time, these need to set to true in the template, otherwise an error is reported:
Error reported:
Once the schedule is created, you can set these back to false, which is a work around.
Note that we have variables defined in the inventory resource.
So the question is why do schedules need these settings, when we don't want to set them? Are we using this incorrectly or miss understanding something? We should be able to set these to false?
Issue Type
Ansible, Collection, Controller details
infra.controller_configuration 2.9.0 (latest).
Controller version: 4.5.7
OS / ENVIRONMENT
Desired Behavior
Actual Behavior
Please give some details of what is actually happening.
Include a [minimum complete verifiable example] with:
STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: