Get access to the Saltstack playground with one click
Welcome to the SaltStack Playground!
SaltStack (Salt) — the high-speed, Python-based infrastructure automation platform. Use masterless salt-call --local to apply states and manage configuration without a Salt Master.
Tip: Run commands with
salt-call --local for masterless mode. No Salt Master or Minion registration needed.What’s Pre-installed
- Salt (latest stable via bootstrap script)
- Shell: bash with vim, nano, git, curl, jq, python3, sudo
Quick Start
salt-call --local test.ping salt-call --local grains.items | head -30 salt-call --local status.diskusage
Common Workflows
# Run modules (ad-hoc commands)
salt-call --local cmd.run "uname -a"
salt-call --local pkg.install vim
salt-call --local file.write /tmp/salt-demo.txt "Hello from Salt!"
salt-call --local file.read /tmp/salt-demo.txt
# Write and apply a state file
mkdir -p /srv/salt
cat > /srv/salt/demo.sls <<'EOF'
create_demo_file:
file.managed:
- name: /tmp/salt-state-demo.txt
- contents: |
Hello from Salt State!
- mode: '0644'
show_demo_file:
cmd.run:
- name: cat /tmp/salt-state-demo.txt
- require:
- file: create_demo_file
EOF
sudo salt-call --local state.apply demoAdvanced Tips
# Grains (system facts)
salt-call --local grains.get os
salt-call --local grains.get ipv4
# Pillar (secure variables)
mkdir -p /srv/pillar
cat > /srv/pillar/top.sls <<'EOF'
base:
'*':
- common
EOF
cat > /srv/pillar/common.sls <<'EOF'
db_host: localhost
EOF
salt-call --local pillar.get db_host
# Apply highstate (all states)
salt-call --local state.highstateSession Notes
- Session lasts 1 hour.
- Masterless mode — use
salt-call --localfor all commands. - Use
sudofor commands that modify system files.