-
-
Save UtahDave/5234e366c7e032b2af56 to your computer and use it in GitHub Desktop.
Scenario 1 dev and prod are subdirectories of herlo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@dasalt:/srv/salt/herlo# sudo salt-call state.top dev/devtop.sls | |
[INFO ] Executing command 'hostname' in directory '/root' | |
<-- snip --> | |
[INFO ] Completed state [nano] at time 15:39:31.434129 | |
local: | |
---------- | |
ID: nano | |
Function: pkg.installed | |
Result: True | |
Comment: The following packages were installed/updated: nano. | |
Started: 15:39:12.513171 | |
Duration: 920 ms | |
Changes: | |
---------- | |
nano: | |
---------- | |
new: | |
2.2.6-1ubuntu1 | |
old: | |
Summary | |
------------ | |
Succeeded: 1 (changed=1) | |
Failed: 0 | |
------------ | |
Total states run: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@dasalt:/srv/salt/herlo# tree | |
. | |
├── dev | |
│ ├── devtop.sls | |
│ └── nano.sls | |
├── empty.sls | |
├── prod | |
│ ├── nonano.sls | |
│ └── prodtop.sls | |
└── top.sls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_roots inside /etc/salt/minion | |
file_roots: | |
base: | |
- /srv/salt/herlo | |
dev: | |
- /srv/salt/herlo/dev | |
prod: | |
- /srv/salt/herlo/prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@dasalt:/srv/salt/herlo# sudo salt-call state.top prod/prodtop.sls | |
[INFO ] Executing command 'hostname' in directory '/root' | |
<-- snip --> | |
[INFO ] Completed state [nano] at time 15:44:29.683450 | |
local: | |
---------- | |
ID: nano | |
Function: pkg.purged | |
Result: True | |
Comment: All targeted packages were purged. | |
Started: 15:44:21.911724 | |
Duration: 771 ms | |
Changes: | |
---------- | |
installed: | |
---------- | |
nano: | |
---------- | |
new: | |
old: | |
2.2.6-1ubuntu1 | |
removed: | |
---------- | |
Summary | |
------------ | |
Succeeded: 1 (changed=1) | |
Failed: 0 | |
------------ | |
Total states run: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment