Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

toc

This section describes how to use the user-defined playbooks and the pre-built playbooks.

Table of Contents

How to Use the User-defined Playbooks

Add/Edit a Playbook

Step 1        Add a playbook.

...

   b)  Click the button  to add a new playbook.

Image RemovedImage Added

   c)  Enter the playbook name and description in the pop-up “Ansible Playbook” box. The playbook name will be used as the main playbook folder name. Then click “Next” to enter "Ansible Playbook" page.

...

   Click “Edit” button in the playbook table in “Operation” column to edit a playbook.

Image RemovedImage Added

   NOTE:

   Don’t forget to click the “Save All” button to save all the configurations after the editing is completed.

...

   NOTE: When the playbook is deleted, the related jobs and task results will also be removed.

Image RemovedImage Added

Save As a Playbook (version control)

Click "Save As" button in the playbook table to create a copy of the current playbook. This function can be used to back up the playbook or to create a different version of the playbook.

The playbook name field will be automatically filled with current playbook name plus with current daytime. User can also rename the new copy playbook.Image Removed

Image Added

Export / Import a Playbook

AmpCon supports to export and import a playbook, the following procedure shows how to export or import a playbook:

...

   The zip file will be automatically downloaded to the local system.

Image RemovedImage Added

Step 2        Import a playbook.

...

   NOTE: The entered playbook name should be unique.

Image RemovedImage Added


Run a Playbook

When running Ansible playbooks, AmpCon executes the defined tasks in file playbook.yml on the targeted switches. This section describes how to run the Ansible playbooks.

Step 1        Click “Run” button in the playbook table.

Image RemovedImage Added

Step 2       Specify the main playbook file in the modal first, then select switches or groups on which to run the playbook, then click “Next” button.

...

Step 3        Edit the ansible option or extra variables in JSON format for running playbook, then click “Next” button.

Image RemovedImage Added

When running a playbook, there are some ansible options that can be set. You can also define extra variables in this box. If the options are not set, the default running options are used. The default ansible options are as follows:

...

   The playbook will be executed immediately.

Image RemovedImage Added

   •   If “One Time” is selected.

   Set a “Start Time” and “End Time”, then the playbook will start running at the specified “Start Time”. When setting the time, the “End Time” should be later than the “Start Time”.

Image RemovedImage Added

   •   If “Scheduled” is selected.

...

   Then the playbook will be triggered by the given crontab expression.

Image RemovedImage Added

      NOTE:

  • Run playbook function will ignore the specified host file in playbook, which is replaced by the selected switches/groups.
  • Run playbook function will use the username/password configured in Settings > System Configuration when executing the defined tasks on the target switches.
  • When running a playbook, the user configured ansible options in Step 3 can override the default options.

...