Ansible Automation

Everyware Cloud can distribute and trigger execution of Ansible scripts in capable devices like ESF devices (check ESF documentation for more details). Ansible automation is build upon the Device Activity framework, a new functionality that has been introduced with EC v5.9 and ESF v7 and v6.2.

Create an Ansible Activity

To submit an Ansible Activity to a device you need to create first an Ansible Activity definition. See Device Activities documentation for more details. In the Device Activities view create the Ansible Activity you need to perform:

2274
  1. Assign the activity a Name and a Description
  2. Select ANSIBLE-V1 as the Device Application
  3. Define the URL of the Ansible Script in Resource URL
  4. Select the authentication method used to establish the connection to the URL
  5. Assign a Label (optional)

Press Submit button to save the newly created activity definiton.

📘

When the activity will be submitted, the device will access the URL to download the Ansible Script. Check that the devices that will execute the activity can reach the Resource URL. If the Resource is protected check that the user has the proper credentials and permissions.

Submit the activity to a device

After the creation you need to select the device you want to submit the Activity Definition. In the Devices view select the device and then select the Activity Updates tab:

2404

📘

If the Activity Updates tab is not visible then the agent installed in the device does not support the Activities framework.

Press the New Update button and select the activity definition and the level of log then press the Submit button.

2406

Press the Submit button to submit the activity.

Check progress

After the submission, the tab shows the progress of the activity sent by the device so that the user can monitor the process. Press the refresh button to gather latest progress notifications.

2406

Bu default ESF devices forward the logs produced by the Ansible Script via Log Analytics. Press the Log button to view the logs. This functionality assumes that Log Analytics is enabled in your EC account .

2402

Submit Ansible Activity using Jobs

Device Jobs allow you to execute an Ansible Activity Submit operation over a fleet of devices running unattended in batch mode. To create and schedule a Job see the Job Documentation, during the step configuration phase you can assign Activity Submit operation to the step.

2404

Copy the Activity Definition ID from the Device Activities view and paste it in the Activity Definition Id box. If required, add username and password for the download of the Ansible Resource. Specify the Log Level then press submit.