]# ansible-doc -s ping
- name: Try to connect to host, verify a usable python and return `pong' on success.
action: ping
command模块(默认):在远程主机运行命令
1
2
3
4
5
6
7
8
9
10
11
12
13
14
]# ansible-doc -s command
- name: Executes a command on a remote node
action: command
chdir # cd into this directory before running the command
creates # a filename or (since 2.0) glob pattern, 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 command module takes a free form command to run. There is no parameter
actually named 'free form'. See the examples!
removes # a filename or (since 2.0) glob pattern, 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.