Create and run executable scripts
ClearGLASS allows you to store and run executable scripts to configure newly created systems or modify existing servers. In order to achieve that, ClearGLASS needs SSH access to the specified machines. By providing a central place to store scripts, ClearGLASS can act as a library to store and reuse configurations and actions.
Adding executable scripts
Run executable scripts
You can add executable scripts to ClearGLASS in three ways:
The simplest way, handy when we only have a few scripts to add. In the Scripts section, select Executable as the type, Inline as Source and paste your script. Press Add to save the script.
Importing through URL
Running executable scripts
Now that we have added our scripts, it is time to see how we can run them. We can do that on a newly created system, or on existing systems that ClearGLASS already has SSH access.
Running a script on a newly created machine
While we are creating a new machine through the Create Machine wizard, on the Script section we can add our script. Once the server is deployed, it will run the playbook.
Running a script on an existing system
We can also run our executable scripts on existing servers. Enter the scripts section, select the script, and select Run script. Then, select the machine from the list and click on Run. The script will be run on that machine. The list shows only the machines that ClearGLASS can connect to via SSH.