Some Tower configuration items such as projects or job templates may need
to run regularly, so a project may need to update from an SCM, or a job
template may need to perform a specific task during the day, and here's a
perfect example where we can use schedules. We can use schedules that
allow set intervals for where you want things to run, and we can also set
run frequencies.
This allows you to schedule your jobs and set the repetition options, and
Ansible Tower has a really good built‑in scheduling feature so operators don't
need to log in and manually perform routine tasks.
So, so many different kinds of jobs can be scheduled,
such as playbook runs, cloud inventory updates, source
control updates can all be scheduled inside Ansible Tower to
run according to your requirements.
So a scheduled job allows you to run a job template,
really similar to a cron‑like schedule.
So after job execution, the results can be viewed in the Completed Jobs.
So as there is no human interaction with scheduled jobs,
I would really recommend using them along with a notification.
We can also use a notification template to send messages about
the success or failure of scheduled jobs.
So scheduled jobs are running in the background, so you
should have a notification assigned to them.
So notifications are really useful, and here you can use Slack,
Webhooks, or Grafana, and you can assign them to different
templates, so when you run a template, it starts to send,
for example, a Slack message when it fails, or when
it succeeds, it can send an email.
This feature lets you notify a person or team when a job succeeds
or fails across the entire organization at once.
So a workflow is an automated approach that allows you to change job
templates or project syncs to run either sequentially or in parallel with
different conditions, such as a successful job run, failure, or always.
With the use of workflows, we enable the orchestration by linking the
various Ansible Tower objects together.
We also have workflow approvals, which are really good, and
this allows the workflow to pause and wait for a human
interaction to improve the next steps.
So a workflow job template links together different types of Ansible Tower
aspects, and these resources are not just limited to templates and will
include, as we mentioned, job templates, workflow templates,
project syncs, and inventory syncs.
So with this workflow, we have an abstraction layer of complexity by adding
convergence and approvals and bringing templates and projects so we can
automate as much as we can. And it's pretty easy for the less‑experienced
user to do with a workflow visualizer.