Skip to content

Instantly share code, notes, and snippets.

@timoguin
Created April 3, 2014 23:23
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 timoguin/9964865 to your computer and use it in GitHub Desktop.
Save timoguin/9964865 to your computer and use it in GitHub Desktop.
cmd.run module vs. cmd.run state from the command line
salt@master01:~$ salt web01.flexdeaf.dev cmd.run 'ufw allow proto tcp from 192.168.1.115 to any port 9997'
web01.flexdeaf.dev:
Rules updated
salt@master01:~$ salt web01.flexdeaf.dev state.single cmd.run 'ufw allow proto tcp from 192.168.1.115 to any port 9998'
web01.flexdeaf.dev:
----------
ID: ufw allow proto tcp from 192.168.1.115 to any port 9998
Function: cmd.run
Result: True
Comment: Command "ufw allow proto tcp from 192.168.1.115 to any port 9998" run
Changes:
----------
pid:
22233
retcode:
0
stderr:
stdout:
Rules updated
Summary
------------
Succeeded: 1
Failed: 0
------------
Total: 1
salt@master01:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment