Salt for VCF Component State & Jinja File Generator - 9.1.1

Generating Files: Each VCF component requires its own set of State and Jinja files. To quickly generate a set, select your target product from the dropdown below. This will automatically update the vcf text in the state fields to your component's name. Then simply select your configuration settings for the Jinja file.
Selecting a component automatically maps the required API code (e.g. nsxt_manager, esxi) into the generated state file and filters the available Jinja settings.
1. VMware Salt for VCF State File (Click to Expand/Collapse)
The name of the Salt State (.sls) file to be generated.
#{% set key-name-in-this-file = "key-name-inside-both-files" %}

#Where key-name-in-this-file is a customer selected label to use as a set variable reference within this state file.
#Where key-name-inside-both-files is a customer selected label that is used in both a state file and a matching Jinja file.

#Link this Salt State file (containing the settings you want to target) and the Jinja file (containing the values of those settings) using this custom key you decide to use. This line is setting variable command in code.
#Insert the path location where your jinja file is located
{% set user-selected-label = global[key-name-inside-each-file] %}
The line above tells Salt to pull the contents of the Jinja file when processing this file. This line is setting variable command in code.
#user-selected-label:
Select any label to identify this setting check.

2. Jinja File Configuration

✅ Fields offered below are tailored for: vCenter
0 Available Settings

Generated Salt State (.sls)

i
  • Variables must not contain spaces. Use underscores (_) or hyphens (-) instead.
  • Fields marked with an asterisk (*) are required, however, the default label names provided can be safely used without modification.

Generated Jinja File (.jinja)

How to Upload your Salt for VCF State and Jinja files with the VMware Salt for VCF Component APIs

Follow these steps to deploy your files using the API:

Step 1: Authenticate
Use a SSO Token to acquire your bearer token for API authorization.

Step 2: Target VCF Objects
Create a Target Group or manually target VCF objects. Follow instructions on how to create a target group or target VCF Objects manually from the TechDocs.

Step 3: Upload Jinja and State Files
Use the fs.write_file API method to upload your Jinja variable definitions and SLS state configuration to the Master file server.
# Upload Jinja file
curl -X POST https://<raas>/rpc \
  -H "Authorization: Bearer <token>" \
  -d '{"resource": "fs", "method": "write_file", "kwarg": {"path": "/my_vcenter_component.jinja", "content": "<base64_jinja>"}}'

# Upload SLS file
curl -X POST https://<raas>/rpc \
  -H "Authorization: Bearer <token>" \
  -d '{"resource": "fs", "method": "write_file", "kwarg": {"path": "/my_vcenter_component_state_file.sls", "content": "<base64_sls>"}}'
Step 4: Run Assessment
Use the job.run API method to execute the state against your targeted minions.
curl -X POST https://<raas>/rpc \
  -H "Authorization: Bearer <token>" \
  -d '{"resource": "job", "method": "run", "kwarg": {"target": "vcenter-minions", "fun": "state.apply", "arg": ["my_vcenter_component_state_file"]}}'
Step 5: Monitor & Remediate
Track execution using the job status and job return API endpoints. If non-compliant items are found, execute a remediation job.