Closed amunro-tsl closed 4 months ago
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!
@amunro-tsl I've just raised #881
Thanks for all your help @Tompage1994
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