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.
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:
- Assign the activity a Name and a Description
- Select ANSIBLE-V1 as the Device Application
- Define the URL of the Ansible Script in Resource URL
- Select the authentication method used to establish the connection to the URL
- 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.
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:
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.
Press the Submit button to submit the activity.
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.
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 .
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.
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.
Updated 7 months ago