Create your first MastJob (Hello World)
This is the time when you should create your first MastJob. So yes, this is beloved 'Hello World'.
Before you get dirty with code, remember to install mast in your cluster and set your current namespace to mast
First things firsts, all actions on cluster at the very end are executed by Ansible. You need to create a playbook to print our 'Hello world' message.
The playbook looks like this:
To make this playbook possible to use in cluster, you have to add it as a ConfigMap.
Now is the time to write your first MastJob.
- Configuration is where you can define inputs as playbooks,inventories and variables used inside ansible runner" .
- Playbook section is required, no ansible run without playbook after all.
- There you specify where is playbook located, name is a name of Configmap and key is keyname of file in that ConfigMap.
Add your MastJob to cluster with
mast CLI or
The last step is to run this MastJob. You can do it with Mast CLI
mast run list to check wheather MastRun is being executed and
mast run logs to see your message.