Note: Post-provisioning scripting is an advanced feature only supported by Operations Manager nodes.
It is possible to upload a script and associated with a device Resource Bundle, to be run by remote Operations Manager node once a Managed Device is considered provisioned. A device is considered to be in a provisioned state once has downloaded all of the files in the Resource Bundle it is being provisioned with.
The script may be uploaded and associated via the UI during Resource Bundle creation using the Post-Provisioning Script option, or via git/scp and the YAML configuration.
- Scripts may be implemented in bash, Python 2 or Python 3, and must start with a shebang – i.e. the first line must be one of:
#!/bin/bash
#!/usr/bin/env python2
#!/usr/bin/env python3
- Scripts are run in a monitored background processes in the Secure Provisioning container (remote-dop) on the node
- Scripts have a default 15 minute timeout, this can be manually configured in the YAML config (post_provision_script_timeout)
- Scripts may login to target device via the network using SSH key auth where nom_remote_ssh_pub_key has been injected into the device config, or using username/password with the sshpass command
Comments
0 comments
Article is closed for comments.