Option to automatically schedule Ansible playbook runs at host creation time

One common task I find myself needing to do is schedule Ansible playbooks runs for hosts.
It would be great if we could assign job schedules during host creation time and leverage things like global defaults or perhaps defaults for a host group.

Is this the correct place to request such a feature?

The best place for the request would be probably in here: Issues - Ansible - Foreman

1 Like

Thanks @iNecas !

Scheduling a regular arbitrary playbook run is possible in job invocation form, scroll to bottom of it and you’ll see the options. If you prefer roles for defining what should be applied on the host, after the host is provisioned, one ansible run of a playbook with all role assigned to host (and through host group) is emmited.

A nice RFE would be defining the schedule per host/host group so it would continue regularly after provisioning too.

1 Like

Yeah, that’s the path I ended up taking, using a dynamic query to fire a reoccurring job to apply the roles every 30 minutes. I agree though, being able to define a schedule at the host group level would be nice, e.g. to more evenly distribute the load on the server.