Skip to content

Xenion1987/saltstack-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

saltstack-playground

Installing

Install requirements

  1. vscode
  2. docker compose
  3. vscode plugins
    1. Dev Containers

Clone this repository

git clone https://github.com/Xenion1987/saltstack-playground.git

Start the playground

Start the saltstack control container

Open the repository in vscode. Vscode should give you a hint, that it has detected a DevContainer config and asks you to reopen it in DevContainer. Accept to initialize and start the environment.

Customize salt-master-debian container

This step will be executed automatically by starting the DevContainer

Starting the DevContainer will execute the script post-create-command.sh. Feel free to modify it to fit to your favorite tools and configs.

Check minion registration

Every minion should try to register with the salt-master:

root ➜ /workspace (main) $ salt-key
Accepted Keys:
Denied Keys:
Unaccepted Keys:
alma.salt.minion
debian.salt.minion
suse.salt.minion
ubuntu.salt.minion
Rejected Keys:

Accept them individually via

salt-key -a <MINION_NAME>

or accept them all at once:

root ➜ /workspace (main) $ salt-key -y -A
The following keys are going to be accepted:
Unaccepted Keys:
alma.salt.minion
debian.salt.minion
suse.salt.minion
ubuntu.salt.minion
Key for minion alma.salt.minion accepted.
Key for minion debian.salt.minion accepted.
Key for minion suse.salt.minion accepted.
Key for minion ubuntu.salt.minion accepted.

Test minion connection

Test whether the accepted minions respond as expected:

root ➜ /workspace (main) $ salt '*' test.version
debian.salt.minion:
    3006.4
alma.salt.minion:
    3006.4
ubuntu.salt.minion:
    3006.4
suse.salt.minion:
    3006.0