|
| 1 | +--- |
| 2 | +--- |
| 3 | + |
| 4 | +# Embedded Ansible Providers |
| 5 | + |
| 6 | +Ansible integrates with {{ site.data.product.title_short }} to provide automation solutions, using playbooks, for Service, Policy and Alert actions. Ansible playbooks consist of series of *plays* or tasks that define automation across a set of hosts, which is known as the inventory. |
| 7 | + |
| 8 | +Ranging from simple to complex tasks, Ansible playbooks can support cloud management: |
| 9 | + |
| 10 | +- **Services** - allow a playbook to back a {{ site.data.product.title_short }} service catalog item. |
| 11 | + |
| 12 | +- **Control Actions** - {{ site.data.product.title_short }} policies can execute playbooks as actions based on events from providers. |
| 13 | + |
| 14 | +- **Control Alerts** - set a playbook to launch prompted by a {{ site.data.product.title_short }} alert. |
| 15 | + |
| 16 | +Ansible is built into {{ site.data.product.title_short }} so there is nothing to install. The basic workflow when using Ansible in {{ site.data.product.title_short }} is as follows: |
| 17 | + |
| 18 | +1. Enable the **Embedded Ansible** server role. |
| 19 | + |
| 20 | +2. Add a source control repository that contains your playbooks. |
| 21 | + |
| 22 | +3. Establish credentials with your inventory. |
| 23 | + |
| 24 | +4. Back your services, alerts, and policies using available playbooks. |
| 25 | + |
| 26 | +### Enabling the Embedded Ansible Server Role |
| 27 | + |
| 28 | +In {{ site.data.product.title_short }}, the **Embedded Ansible** role is disabled by default. Enable this server role to utilize Ansible Automation Inside. |
| 29 | + |
| 30 | +**Note:** Configure your {{ site.data.product.title_short }} appliance network identity (hostname/IP address) before enabling the Embedded Ansible server role. Restart the `evmserverd` service on the appliance with the enabled Embedded Ansible server role after making any changes to the hostname or IP address. |
| 31 | + |
| 32 | +1. Browse to the settings menu, then **Configuration > Settings**. |
| 33 | + |
| 34 | +2. Select the desired server under **Zones**. |
| 35 | + |
| 36 | +3. Set the **Server Role** for **Embedded Ansible** to **On**. |
| 37 | + |
| 38 | +### Verifying the Embedded Ansible Worker State |
| 39 | + |
| 40 | +Verify that the Embedded Ansible worker has started to utilize its features. |
| 41 | + |
| 42 | +1. Browse to the settings menu, then **Configuration > Diagnostics** and click on the desired server. |
| 43 | + |
| 44 | +2. Click on the **Roles by Servers** tab. |
| 45 | + |
| 46 | +A table of all workers and current status will appear from which you can confirm the state of your embedded Ansible worker. |
| 47 | + |
| 48 | +### Adding a Playbook Repository |
| 49 | + |
| 50 | +Add a repository so that {{ site.data.product.title_short }} can discover and make available your playbooks. |
| 51 | + |
| 52 | +1. Browse to menu: **Automation > Ansible > Repositories**. |
| 53 | + |
| 54 | +2. Click **Configuration**, then  (**Add New Repository**). |
| 55 | + |
| 56 | +3. Provide a Repository Name in the **Name** field. |
| 57 | + |
| 58 | +4. Add a description for the repository in the **Description** field. |
| 59 | + |
| 60 | +5. Add a **URL** or IP Address for the repository. |
| 61 | + |
| 62 | +6. Select the appropriate **SCM Credentials** from the drop-down menu. |
| 63 | + |
| 64 | +7. Provide a branch name in the **SCM Branch** field. |
| 65 | + |
| 66 | +8. Click **Save**. |
| 67 | + |
| 68 | +Once you have synced a repository, its playbooks will become available to {{ site.data.product.title_short }}. |
| 69 | + |
| 70 | +### Refreshing Repositories |
| 71 | + |
| 72 | +{{ site.data.product.title_short }} allows you to refresh a targeted playbook repository or all repositories in your inventory to ensure your playbooks are current. |
| 73 | + |
| 74 | +Refresh a targeted repository: |
| 75 | + |
| 76 | +1. Browse to menu: **Automation > Ansible > Repositories**. |
| 77 | + |
| 78 | +2. Click on a repository. |
| 79 | + |
| 80 | +3. Click **Configuration**, then  (**Refresh this Repository**). |
| 81 | + |
| 82 | +Alternately, you can refresh some or all repositories from the list view: |
| 83 | + |
| 84 | +1. Browse to menu: **Automation > Ansible > Repositories**. |
| 85 | + |
| 86 | +2. Check those repositories to refresh. Click **Check All** to select all repositories. |
| 87 | + |
| 88 | +3. Click **Configuration**, then  (**Refresh Selected Ansible Repositories**). |
| 89 | + |
| 90 | +{% include_relative _topics/ansible_credentials.md %} |
| 91 | + |
| 92 | +{% include_relative _topics/tagging_ansible_elements.md %} |
| 93 | + |
| 94 | +{% include_relative _topics/optimizing_playbooks.md %} |
0 commit comments