IBM Cloud Docs
Updating a Schematics action

Updating a Schematics action

Updating Schematics actions involves modifying the action definition to incorporate new configurations or automation logic. After making changes, validate and reapply the updated action to ensure the revised workflow functions correctly across targeted resources, enabling the deployment of complex multitiered applications to your cloud infrastructure.

Before you begin

Before initiating the update of a Schematics action for Ansible playbooks, confirm that you meet the following prerequisites:

  • Create an Ansible playbook and store it in a GitHub or GitLab repository. Alternatively, use one of the IBM-provided Ansible playbooks.
  • Verify that you possess the required permissions to create a Schematics action.

Make sure that the location and the url endpoint are consistent when creating or updating Schematics workspaces and actions, as they must point to the same region. This helps ensure proper data storage and access for your automation tasks.

Updating an action by using Console

Update a Schematics action and specify the Ansible playbook that you want to run against your Cloud resources.

  1. Log in to IBM Cloud console.

  2. Click the Menu icon Hamburger icon > Platform Automation > Schematics > Ansible > click your Ansible Action name.

  3. From the Overview > Details section, click Edit icon.

  4. Modify the action details such as Description, GitHub, GitLab or Bitbucket repository URL, Branch (optional), Folder (optional), Personal access token (Only necessary for private repository), Playbook, and Verbosity.

  5. In Update inventory page, Optionally, edit Inventory name, Description, Connection type (SSH or WinRM), Host groups, define the host group upon which your playbook operates by using .ini file format, GitHub, GitLab or Bitbucket repository URL, Branch (optional), Folder (optional), Personal access token (Only necessary for private repository), Playbook, and Verbosity.

  6. Click your Inventory and then click [...] to Manage credentials, Manage variables, or Delete inventories.

  7. Click Check action to verify the tasks you are trying to run, and help ensure that your resources are properly linked to your playbook. You can monitor the Action history section to view the results in the logs. This check verifies the tasks that you are trying to run, and ensure that your resources are properly linked to your playbook.

    You cannot delete or stop a running job of your Schematics action. To change your action, wait for the job to complete, then change your settings, and click Check action or Run action again.

  8. Click Run action to run the action. You can monitor the progress of an action by reviewing the logs on the Jobs page. Every 30 seconds the job logs are automatically refreshed.

    In the console, there is no limit to the number of job logs displayed. The logs are automatically refreshed every 30 seconds. For a complete view of your action's job logs, use the ibmcloud schematics job list command.

Updating an action by using CLI

  1. From your local command line interface{: external}, setup your CLI and Schematics plug-in.
  2. Update an action by using the ibmcloud schematics action update command.
  3. Update an inventory by using the ibmcloud schematics inventory update command.
  4. Check the logs to verify that the updation is successful.

Updating an action by using API

  1. Retrieve your IAM access token and authenticate with Schematics using the API.
  2. Update an inventory by sending a PUT request.
  3. Check the response status to verify that the updation is successful.

Next steps

After setting up and updating your Schematics action, you can further enhance your automation workflow with the following options:

  • Creating an auto deploy button: This feature allows you to trigger your Schematics action automatically, streamlining the deployment process and reducing manual intervention.

  • Deleting Schematics action: If you no longer require a specific action, you can delete it to maintain a clean and organized automation environment.