Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 9. Working with job templates

download PDF

A job template combines an Ansible playbook from a project and the settings required to launch it. Job templates are useful to run the same job many times. Job templates also encourage the reuse of Ansible playbook content and collaboration between teams. For more information, see Job Templates in the Automation controller User Guide.

9.1. Getting started with job templates

As part of the initial setup, a Demo Job Template is created for you.

Procedure

  1. To review existing templates, select Resources Templates from the navigation panel.
  2. Click Demo Job Template to view its details.
Job templates

9.2. Editing a job template

As part of the initial setup, you can leave the default Demo Job Template as it is, but you can edit it later.

Procedure

  1. Open the template to edit it by using one of these methods:

    • Click Edit in the job template Details page.
    • From the navigation panel, select Resources Templates. Click Edit next to the template name and edit the appropriate details.
  2. Save your changes.

    Job templates
  3. To exit after saving and return to the Templates list view, use the breadcrumb navigation links or click Cancel. Clicking Save does not exit the Details dialog.

9.3. Running a job template

A benefit of automation controller is the push-button deployment of Ansible playbooks. You can configure a template to store all the parameters that you would normally pass to the Ansible playbook on the command line. In addition to the playbooks, the template passes the inventory, credentials, extra variables, and all options and settings that you can specify on the command line.

Procedure

  • From the navigation panel, select Resources Templates and click Launch next to the job template.
Launch template

The initial job start generates a status page, which updates automatically by using automation controller’s Live Event feature, until the job is complete.

For more information about the job results, see Jobs in automation controller in the Automation controller User Guide.

Additional resources

To learn more about these automation controller features or to learn about administration tasks and the controller API, see the following documentation sets:

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.