starxzj 发表于 2018-7-30 09:27:52

ansible之shell和script模块

# ansible-doc -s shell  
less 436
  
Copyright (C) 1984-2009 Mark Nudelman
  
less comes with NO WARRANTY, to the extent permitted by law.
  
For information about the terms of redistribution,
  
see the file named README in the less distribution.
  
Homepage: http://www.greenwoodsoftware.com/less
  
- name: Execute commands in nodes.
  
action: shell
  
      chdir                  # cd into this directory before running the command
  
      creates                # a filename, when it already exists, this step will *not* be run.
  
      executable             # change the shell used to execute the command. Should be an absolute path to the executable.
  
      free_form=             # The shell module takes a free form command to run, as a string.There's not an actual option
  
                               named "free form".See the examples!
  
      removes                # a filename, when it does not exist, this step will *not* be run.
  
      warn                   # if command warnings are on in ansible.cfg, do not warn about this particular line if set to
  
                               no/false.
页: [1]
查看完整版本: ansible之shell和script模块