Last active
March 21, 2021 20:52
-
-
Save kwilczynski/3bafd8b67b4c7cd0cb37 to your computer and use it in GitHub Desktop.
Quickly test Salt state from current directory
This file contains hidden or 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
vagrant@ubuntu1404:~$ sudo salt-call --local --file-root=. --pillar-root=. state.sls test | |
[INFO ] Loading fresh modules for state activity | |
[INFO ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://test.sls' | |
[INFO ] Running state [echo 'Hello Dave, would you like to play chess?'] at time 15:05:30.278219 | |
[INFO ] Executing state cmd.run for echo 'Hello Dave, would you like to play chess?' | |
[INFO ] Executing command "echo 'Hello Dave, would you like to play chess?'" in directory '/home/vagrant' | |
[INFO ] {'pid': 2901, 'retcode': 0, 'stderr': '', 'stdout': 'Hello Dave, would you like to play chess?'} | |
[INFO ] Completed state [echo 'Hello Dave, would you like to play chess?'] at time 15:05:30.282402 | |
local: | |
---------- | |
ID: test | |
Function: cmd.run | |
Name: echo 'Hello Dave, would you like to play chess?' | |
Result: True | |
Comment: Command "echo 'Hello Dave, would you like to play chess?'" run | |
Started: 15:05:30.278219 | |
Duration: 4.183 ms | |
Changes: | |
---------- | |
pid: | |
2901 | |
retcode: | |
0 | |
stderr: | |
stdout: | |
Hello Dave, would you like to play chess? | |
Summary | |
------------ | |
Succeeded: 1 (changed=1) | |
Failed: 0 | |
------------ | |
Total states run: 1 |
This file contains hidden or 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
vagrant@ubuntu1404:~$ cat test.sls | |
test: | |
cmd.run: | |
- name: echo 'Hello Dave, would you like to play chess?' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment