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 Linux Execution Server Installation and Configuration.

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.

Notes:

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. If you have several Execution Servers that support Ansible but want to use this one, see the following section:

    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. For more information, see Managing Public Cloud Apps in Domains or Managing Private Cloud Apps in Domains.

    To set a specific Execution Server for Ansible configuration management:

    1. Select the attribute and specify a value.
    2. Specify the same value on the Execution Server Selector attrribute in the cloud provider resource and/or in the Resource Manager Client > Configuration Services > Ansible Configuration service model.

      By default, CloudShell will use the Execution Server defined in the cloud provider resource. If it is not available, CloudShell will use the Execution Server defined in the Ansible Configuration model. Execution Servers specified on the deployed App shell/resource are not used for configuration management.

      Note: You can also 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'}" ***
    /s Quali Server IP address or hostname
    /u CloudShell admin to connect to CloudShell server
    /p CloudShell admin's password
    /esn Execution Server name to register with CloudShell
    /ansible Parameter 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.

    Notes:
    • If the Execution Server VM does not have an internet connection, make sure the OfflinePackageRepository zip file is extracted to the local PyPi Server repository. For details, see Add the out-of-the-box dependencies package to the local PyPi Server repository.
    • Quali Server must be running when configuring the Execution Server.

    • Depending on your flavor of Linux, you may need to escape parameter values containing special characters with single or double quotes. For example: "admin1234!"

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