config.yaml files that you can adapt for your environment.
Example 1: Managing nginx across a web server fleet
This example shows how to manage nginx configuration across multiple web servers. All servers get the same base configuration, and changes are rolled out automatically when you push to Git.Repository structure
The config.yaml
production/web-servers/config.yaml
Workflow: Updating nginx config
1
Edit the config
Update the nginx configuration in your Git repository:
2
Validate before committing
Use the CLI to validate your config locally:Output if valid:
3
Commit and push
4
Monitor rollout
Watch the rollout in the dashboard or via CLI:Output:After agents reconcile:
Example 2: Rolling out security patches
This example shows how to ensure security-critical packages are always at the latest version across your fleet.The config.yaml
production/security-baseline/config.yaml
Workflow: Responding to a CVE
When a critical vulnerability is announced (e.g., in OpenSSL):1
No config change needed
Because
openssl is set to state: latest, agents will install updates automatically during their next reconciliation cycle.2
Force immediate reconciliation (optional)
If you need updates applied immediately, trigger a manual sync from the dashboard or restart agents:
3
Verify patch status
Example 3: Environment promotion (staging to production)
This example shows a repository structure for managing multiple environments, making it easy to test changes in staging before promoting to production.Repository structure
Staging config
environments/staging/config.yaml
Production config
environments/production/config.yaml
Workflow: Promoting changes
1
Make changes in staging
2
Test in staging
3
Promote to production
Copy the tested changes to production config:
4
Monitor production rollout
5
Rollback if needed
If something goes wrong:
Tips for managing configs at scale
Use dry-run mode first
Deploy agents in dry-run mode initially to see what would change without actually making changes:
Set up webhooks
Configure webhook notifications to get alerts on drift or errors:
Validate before pushing
Always validate configs locally before committing:
Use meaningful commit messages
Your Git history becomes your change log. Write clear commit messages: