---
name: schematics-autodeploy_actionsamples
title: Sample Ansible playbook templates for Schematics actions
description: Explore the IBM provided Ansible playbooks to run cloud operations on target hosts or to get started with Schematics actions.
last-updated: 2025-01-17
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/schematics?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Sample Ansible playbook templates for Schematics actions
{: #sample_actiontemplates}

Explore the IBM provided Ansible playbooks to run cloud operations on target hosts or to get started with Schematics actions.
{: shortdesc}

Use the links on the page as follows:
    - `View GitHub repo`: Click the link to open the Git repository where the template is stored. You can review the file structure, the Ansible playbook instructions, and the `README` file that contains the steps to use the template in Schematics.
    - `Deploy to IBM Cloud`: Takes you to **Create an action** page with the **GitHub repository URL** and the **Action name** pre-populated.

## Running cloud operations on Virtual Servers for VPC
{: #ansible-vpc}

Description
:    Use `ansible-is-instance-actions` Ansible playbook to perform Day 2 operations such as start, stop, and restart for IBM Cloud&reg; Virtual Servers for Virtual Private Cloud. To configure and run the Schematics actions by using the CLI or console, see [readme file](https://github.com/Cloud-Schematics/ansible-is-instance-actions/blob/master/README.md){: external} template file.

Source
:    [View on GitHub](https://github.com/Cloud-Schematics/ansible-is-instance-actions){: external}

Deploy
:   <img usemap="#deploybutton_map1" alt="Auto deployment button" src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg"><map name="deploybutton_map1" alt="This image leads to create an action.">
    <area alt="Deploy to IBM Cloud" title="Deploy to IBM Cloud" href="https://cloud.ibm.com/schematics/actions/create?name=ansible-is-instance-actions&repository=https://github.com/Cloud-Schematics/ansible-is-instance-actions" target="_blank" coords="1,3,139,20" shape="rect">
</map>

## Provisioning a LAMP stack on Virtual Servers for VPC
{: #ansible-lamp-stack}

Description
:    Use `lamp-simple` Ansible playbook to deploy the LAMP stack components on Virtual Servers for VPC by following a simple deployment architecture. To configure and run the Schematics actions by using the CLI or console, see [readme file](https://github.com/Cloud-Schematics/lamp-simple/blob/master/README.md){: external} template file.

Source
:    [View on GitHub](https://github.com/Cloud-Schematics/lamp-simple){: external}

Deploy
:   <img usemap="#deploybutton_map2" alt="Auto deployment button"  src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg"><map name="deploybutton_map2" alt="This image leads to create an action.">
    <area alt="Deploy to IBM Cloud" title="Deploy to IBM Cloud" href="https://cloud.ibm.com/schematics/actions/create?name=lamp-simple&repository=https://github.com/Cloud-Schematics/lamp-simple" target="_blank" coords="1,3,139,20"  shape="rect"></map>

## Configuring IBM Cloud Databases for PostgreSQL with WAL2JSON plug-in
{: #ansible-databases}

Description
:    Use `ansible-icd-postgres-actions` Ansible playbook to configure the WAL2JSON plug-in on your IBM Cloud Databases for PostgreSQL service instance. To configure and run the Schematics actions by using the CLI or console, see [readme file](https://github.com/Cloud-Schematics/ansible-icd-postgres-actions/blob/master/README.md){: external} template file.

Source
:    [View on GitHub](https://github.com/Cloud-Schematics/ansible-icd-postgres-actions){: external}

Deploy
:   <img usemap="#deploybutton_map3" alt="Auto deployment button" src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg"><map name="deploybutton_map3" alt="This image leads to create an action.">
    <area alt="Deploy to IBM Cloud" title="Deploy to IBM Cloud" href="https://cloud.ibm.com/schematics/actions/create?name=ansible-icd-postgres-actions&repository=https://github.com/Cloud-Schematics/ansible-icd-postgres-actions" target="_blank" coords="1,3,139,20" shape="rect"></map>

## Automating app deployments in IBM Cloud Kubernetes Service
{: #ansible-iks-deploy}

Description
:    Use `ansible-app-deploy-iks` Ansible playbook to deploy `Hackathon Starter` on an IBM Cloud&reg; Kubernetes Service cluster. To configure and run the Schematics actions by using the CLI or console, see [readme file](https://github.com/Cloud-Schematics/ansible-app-deploy-iks/blob/master/README.md){: external} template file.

Source
:    [View on GitHub](https://github.com/Cloud-Schematics/ansible-app-deploy-iks){: external}

Deploy
:   <img usemap="#deploybutton_map4" alt="Auto deployment button" src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg"><map name="deploybutton_map4" alt="This image leads to create an action.">
    <area alt="Deploy to IBM Cloud" title="Deploy to IBM Cloud" href="https://cloud.ibm.com/schematics/actions/create?name=ansible-app-deploy-iks&repository=https://github.com/Cloud-Schematics/ansible-app-deploy-iks" target="_blank" coords="1,3,139,20" shape="rect"></map>

## Installing `kubectl` on Virtual Servers for VPC
{: #ansible-kubectl}

Description
:    Use `ansible-kubectl` Ansible playbook to install the Kubernetes CLI <code>kubectl</code> on Virtual Servers for VPC by using a role from Ansible Galaxy. To configure and run the Schematics actions by using the CLI or console, see [readme file](https://github.com/Cloud-Schematics/ansible-kubectl/blob/master/README.md){: external} template file.

Source
:    [View on GitHub](https://github.com/Cloud-Schematics/ansible-kubectl){: external}

Deploy
:   <img usemap="#deploybutton_map5" alt="Auto deployment button" src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg"><map name="deploybutton_map5" alt="This image leads to create an action.">
    <area alt="Deploy to IBM Cloud" title="Deploy to IBM Cloud" href="https://cloud.ibm.com/schematics/actions/create?name=ansible-kubectl&repository=https://github.com/Cloud-Schematics/ansible-kubectl" target="_blank" coords="1,3,139,20"  shape="rect"></map>

Looking for more code examples? Check out the [samples for IBM Cloud Schematics GitHub repositories](https://github.com/Cloud-Schematics?q=Ansible&type=all&language=&sort=){: external}.
{: tip}