Advertisement
Guest User

Untitled

a guest
Jun 19th, 2014
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. my_state_file.sls:
  2. hdfs-tmpdir-absent:
  3. module.run:
  4. - name: hadoop.dfs_absent
  5. - path: /tmp_salt
  6.  
  7.  
  8.  
  9.  
  10. Running state.sls my_state_file return:
  11.  
  12. ID: hdfs-tmpdir-absent
  13. Function: module.run
  14. Name: hadoop.dfs_absent
  15. Result: True
  16. Comment: Module function hadoop.dfs_absent executed
  17. Changes:
  18.  
  19.  
  20.  
  21. Running the execution from command line:
  22.  
  23. [root@hd-qa-apps1 salt]# salt-call hadoop.dfs_absent /tmp_salt; echo $?
  24. [INFO ] Executing command 'hdfs dfs -stat /tmp_salt' in directory '/root'
  25. [INFO ] output: 2014-06-20 01:01:05
  26. local:
  27. False
  28. 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement