Usage

There are several ways to get the desired profile to run during the VM lifecycle:

1. Attach vRA Property Group to vRA Blueprint

When the SovLabs Configuration is created, a vRA property group for that configuration is also created. That Property Group contains a custom property of SovLabs_AnsibleTowerProfile with a value of the profile name.

By setting this property to the profile name, we enable that profile to run during the machine’s lifecycle.
The vRA Event Broker Subscription (EBS) created during the configuration of the SovLabs modules controls the order in which the various integrations will run.

The easiest way to enable the profile for your build is to add the SovLabs Property group to the vRA blueprint, either at the blueprint level, or at the machine level.

Be sure to login using the correct URL for your tenant and a service account that was entitled to the SovLabs Service during the Configuration steps, e.g. sov_admin
  1. Login to vRealize Automation.
  2. Click on the Design tab > Blueprints
  3. Click the blueprint name to Edit it
    1. Click on the vSphere machine component on the Blueprint Design Canvas
    2. Click on the Properties tab
    3. In the Property Groups section, add the vRA property group for Ansible Tower:
      • Property Group name: SovLabs-AnsibleTowerProfile-[tenant]_[profile_shortname]
Do not attach more than 1 Ansible Tower vRA Property Group to a blueprint

Repeat for all desired vRA blueprints and provision!

The vRA Property Group can also be attached at the vRA Business Group or Reservation level

2. Set the SovLabs Custom Property to the desired profile name

Instead of adding a Property Group to the blueprint, a more streamlined method is to simply set the SovLabs Custom Property to the desired profile name.

This can be done with the Profile Name as a hardcoded value.

For the Ansible Tower module, the SovLabs Custom Property is SovLabs_AnsibleTowerProfile

Instead of setting a property on each Blueprint, you can also set this property more globally by creating the custom property on a vRA endpoint, or a Reservation, or even a Business Group.

You can set the SovLabs vRA profile properties on any component in vRA that allows Custom Properties to be created.

Just remember to keep track of where you set them!

3. The SovLabs profile can be chosen dynamically using the SovLabs Template Engine

For this example, assume there is a vRA Custom Property called location and it’s value is set to “Norcross”.
If we want to use one Ansible Tower profile for the “Norcross” location and different one for any other location, you could write a template that does this:

if location is “Norcross”, set the SovLabs_AnsibleTowerProfile property to
my_Ansibletower_profileA
otherwise set it to
my_Ansibletower_profileB

Template Syntax: {% if location == "Norcross" %}my_Ansibletower_profileA{% else %}my_Ansibletower_profileB{% endif %}

Result: SovLabs_AnsibleTowerProfile is set to my_Ansibletower_profileA

If location had been set to something other than “Norcross”, the result: SovLabs_AnsibleTowerProfile is set to my_Ansibletower_profileB

*See documentation on the SovLabs Template Engine and the SovLabs Template Tester .


Disable

To disable the the integration from running for troubleshooting or other purposes

If you enabled the integration by adding the Property Group to the Blueprint, remove it

  1. Login to the vRA tenant
  2. Click on the Design tab > Blueprints
  3. Hover over the desired blueprint name and click Edit
    1. Click on the vSphere machine component on the Blueprint Design Canvas
    2. Click on the Properties tab
    3. In the Property Groups section, remove the vRA property group for Ansible Tower:
      • Property Group name: SovLabs-AnsibleTowerProfile-[tenant]_[profile_shortname]

Repeat Step 3 for all desired blueprints


Unpublishing the Event Broker Subscriptions is a non-destructive and simple way to disable the workflows for SovLabs module Ansible Tower module from running for all builds.

  1. Login to the vRA tenant
  2. Click on the Administration tab -> Events -> Subscriptions
  3. Highlight the Event Broker subscription and click Unpublish

The vRA EBS will go to “Draft” mode and will not execute until you click “Publish” to publish it again.


Synchronize Ansible Tower Inventory

Only able to perform on Static Inventory Type

  1. Login to vRA tenant
  2. Click on the Items tab
  3. Click on the SovLabs vRA Extensibility Modules menu option (left-pane)
  4. Click on the SovLabs Ansible Tower Inventory Profile menu option (left-pane)
  5. Find the desired Ansible Tower Inventory Profile and click on Actions
  6. Click on Synchronize Ansible Tower Inventory to request
  7. Click Submit
Synchronize Ansible Tower Inventory
Synchronize Ansible Tower Inventory

FieldValue
Synchronize Ansible Tower Inventory
Configuration label

Read-only field of the SovLabs Ansible Tower Inventory Profile to perform a sync

Note

Click 'Submit' to update groups and hosts in the Ansible Tower Inventory to match the SovLabs Ansible Tower Inventory Profile


Configure Ansible Tower Custom Inventory

Only able to perform on Dynamic Inventory Type

  1. Login to vRA tenant
  2. Click on the Items tab
  3. Click on the SovLabs vRA Extensibility Modules menu option (left-pane)
  4. Click on the SovLabs Ansible Tower Inventory Profile menu option (left-pane)
  5. Find the desired Ansible Tower Inventory Profile and click on Actions
  6. Click on Configure Ansible Tower Custom Inventory to request
  7. Fill out the form accordingly (see below) and Submit
Configure Ansible Tower Custom Inventory
Configure Ansible Tower Custom Inventory

FieldValue
Ansible Tower Inventory Profile
Configure Custom Inventory?

Select to create the cache directory and dynamic inventory configuration YAML file on the indicated Ansible Tower endpoint

Ansible Tower Host Access
Ansible Tower Endpoint

Read-only field provided as a reference

References the Ansible Tower Endpoint selected in the previous tab

Ansible Tower Hostname

Read-only field provided as a reference

Displays the full Ansible Tower Endpoint's URL.

The cache directory and dynamic inventory configuration YAML file will be placed in the /sovlabs directory

Command for privilege escalation (e.g. sudo)

The command for the type of Linux the Ansible Tower server is using.

If the Host Username defined below has root privilege, this field can be left blank

Host Username

A username who is in the sudoer file or otherwise root privilege

Host Password

Host username's password

Click for Dynamic Inventory Configuration
FieldValue
vRO Host

Auto-generated and may be overwritten by the user

The URL of the vRO Host

vRO Port

Auto-generated and may be overwritten by the user

The Port of the vRO Host

vRO Username

The vRO Username of the vRO Host

vRO Password

The Password for the vRO Username

Click for Inventory Setup
FieldValue
Organization Setup
Create Organization?

Select to create a new Organization or use an existing one

Organization Name

Create Organization? is not checked

Auto-generated list based on Ansible Tower Endpoint selected

Select a desired Organization


Create Organization? is checked

Type in the new Organization name to create

Description

Shown when 'Create Organization?' is checked

New Organization description

Inventory Setup
Create Inventory?

Select to create a new Inventory or use an existing one

Inventory Name

Create Inventory? is not checked

Auto-generated list based on Ansible Tower Endpoint selected

Select a desired Inventory


Create Inventory? is checked

Type in the new Inventory name to create

Description

Shown when 'Create Inventory?' is checked

New Inventory description

Group Setup
Create Group?

Select to create a new Group or use an existing one

Group Name

Create Group? is not checked

Auto-generated list based on Ansible Tower Endpoint selected

Select a desired Group


Create Group? is checked

Type in the new Group name to create

Description

Shown when 'Create Group?' is checked

New Group description

Inventory Source Setup
Create Inventory Source?

Option only available to Ansible Tower 3.2+

Select to create a new Inventory Source or use an existing one

Inventory Source Name

Create Inventory Source? is not checked

Auto-generated list based on Ansible Tower Endpoint selected

Select a desired Inventory Source


Create Inventory Source? is checked

Type in the new Inventory Source name to create

Description

Shown when 'Create Inventory Source?' is checked

New Inventory Source description

Inventory Script Setup
Inventory Script Options

Select from the provided options

Inventory Script Name

Inventory Script Options is either of the 'Assign to Group' option is selected

Auto-generated list based on Ansible Tower Endpoint and Organization selected. If Organization is blank, gets all

Select a desired Inventory Source


Inventory Script Options is Create new with Latest Custom Inventory

Type in the new Inventory Script name to create

Description

New Inventory Script description