Skip to content

x2ansible/salt-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salt Examples

This folder contains synthetic Salt state examples used to develop and test the Salt-to-Ansible convertor.

Example Complexity Features Demonstrated Description
trivial Simple Basic package management Single package installation using pkg.installed
medium Moderate Package, service, file, template Web server setup with config file and service management
complex Advanced Multi-state, pillars, grains, requisites, orchestration Full application stack with user management, multiple services, templating, and state dependencies

Example Structure

Each example follows standard Salt state tree structure:

  • salt/ - Contains state files (.sls)
  • pillar/ - Contains pillar data (configuration variables)
  • templates/ - Contains Jinja2 templates for configuration files

Running Examples

These are synthetic examples for migration testing. To test with actual Salt:

# Test a single state
salt-call --local state.apply <state-name> --file-root=./salt --pillar-root=./pillar

# Example:
cd examples/salt-examples/medium
salt-call --local state.apply webserver --file-root=./salt --pillar-root=./pillar

About

Sample Salt sources to test migration to Ansible. More info: https://saltproject.io/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors