Skip to content

Instantly share code, notes, and snippets.

@dlanderson
Created March 4, 2014 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlanderson/9b60a0b307593282d5fa to your computer and use it in GitHub Desktop.
Save dlanderson/9b60a0b307593282d5fa to your computer and use it in GitHub Desktop.
(salt-dev)root@salt:/srv/salt/base/dev_testing# cat names.sls
blah:
cmd.run:
- names:
- 'echo one'
- 'echo two'
- 'echo three'
(salt-dev)root@web1:/mnt/salt-dlanderson# salt-call state.sls dev_testing.names
[INFO ] Loading fresh modules for state activity
[INFO ] Fetching file ** skipped **, latest already in cache 'salt://dev_testing/names.sls'
[INFO ] Executing state cmd.run for echo two
[INFO ] Executing command 'echo two' in directory '/root'
[INFO ] {'pid': 14193, 'retcode': 0, 'stderr': '', 'stdout': 'two'}
[INFO ] Executing state cmd.run for echo one
[INFO ] Executing command 'echo one' in directory '/root'
[INFO ] {'pid': 14194, 'retcode': 0, 'stderr': '', 'stdout': 'one'}
[INFO ] Executing state cmd.run for echo three
[INFO ] Executing command 'echo three' in directory '/root'
[INFO ] {'pid': 14195, 'retcode': 0, 'stderr': '', 'stdout': 'three'}
local:
----------
State: - cmd
Name: echo two
Function: run
Result: True
Comment: Command "echo two" run
Changes: pid: 14193
retcode: 0
stderr:
stdout: two
----------
State: - cmd
Name: echo one
Function: run
Result: True
Comment: Command "echo one" run
Changes: pid: 14194
retcode: 0
stderr:
stdout: one
----------
State: - cmd
Name: echo three
Function: run
Result: True
Comment: Command "echo three" run
Changes: pid: 14195
retcode: 0
stderr:
stdout: three
Summary
------------
Succeeded: 3
Failed: 0
------------
Total: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment