Online Help

This help article applies to CloudShell 9.3. To see the latest, click here.

Configure Execution Server for Ansible

To support Ansible configuration management operations, you need a Linux-based Execution Server that includes the following prerequisites and configurations.

For existing Linux-based Execution Servers, perform the below steps on the machines of the Execution Servers to be used for Ansible configuration management. To deploy a new Execution Server on a Linux VM, see the CloudShell Execution Server over Linux Virtual Appliance help.

Prerequisites

Before you start, make sure the Linux machine containing the Execution Server includes the following:

  • Python 2.6 or 2.7. Python 2.7 is installed with the Execution Server over Linux Virtual Appliance.
  • Ansible 2.2 command line installation. See the formal Ansible Installation files.

Indicate Execution Servers that run Ansible

This section explains how to indicate that the Execution Server installation has Ansible installed and therefore can support Ansible operations on Apps.

To configure an Execution Server using CloudShell Portal:

  1. In the Execution Server machine, log in to CloudShell Portal as administrator.
  2. In the Manage dashboard, click Execution Servers and then select Servers.
  3. In the Servers page, click the Execution Server's name.

    The Attributes window pops up.

  4. Select the Supports Ansible check box, to use this Execution Server for Ansible configuration management.
  5. Use the Execution Server Selector attribute if you have several Execution Servers that support Ansible but want to use this one. This is recommended for geographically distributed deployments where you want a local Execution Server to perform operations on cloud providers that are physically nearest that Execution Server. This is recommended for geographically distributed deployments, see Managing Private Cloud Apps in Domains or Managing Public Cloud Apps in Domains.

    To set an Execution Server for Ansible configuration management:

    1. Select the attribute and specify a value.
    2. Specify the same value on the Execution Server Selector attribue in the Ansible Configuration service model in Resource Manager Client (in the Configuration Services family) to configure this Execution Server to deploy and tear down Apps configured with the same Execution Server Selector value.

      In addition, you can configure the designated Ansible Execution Server to perform additional operations, such as running shells or commands.

  6. Click Done.

To configure an Execution Server via command-line:

  1. In the Execution Server machine, run command-line as administrator.
  2. Navigate to the /root/ExecutionServer folder (or opt/ExecutionServer for Linux machines on Azure or AWS).
  3. Run the following command with your details:

    mono QsExecutionServerConsoleConfig.exe /s:localhost /u:admin /p:admin /esn:my_es /ansible /a:"{'Execution Server Selector':'CloudShell domain'}" ***

    /sQuali Server IP address or hostname
    /uCloudShell admin to connect to CloudShell server
    /pCloudShell admin's password
    /esnExecution Server name to register with CloudShell
    /ansibleParameter indicating to Ansible configuration management that this Execution Server supports Ansible operations
    /a

    Additional attributes to set on the Execution Server. For example, passing to that option the value {'attributeName1':'attributeValue1', 'attributeName2':'attribauteValue2'} adds two attributes and their values.

    Note that the attributes must have the Execution Server Selector rule.

    Important: If you have several Execution Servers that support Ansible, the Execution Server Selector attribute allows you to dedicate this Execution Server to perform Ansible operations on CloudShell Apps by setting the same value in this attribute and in the Execution Server Selector attribute on the Ansible Configuration service model in Resource Manager Client (in the Configuration Services family).

  4. Next, make sure to Enable WinRM on Windows VMs to Support Ansible.