wangyan188 发表于 2018-7-30 13:15:50

利用ansible modules模块来自定义集群管理

$ ansible web -m command -a "ps aux|grep nginx"  
10.150.145.53 | FAILED | rc=1 >>
  
ERROR: Unsupported option (BSD syntax)
  
********* simple selection ****************** selection by list *********
  
-A all processes                      -C by command name
  
-N negate selection                   -G by real group ID (supports names)
  
-a all w/ tty except session leaders-U by real user ID (supports names)
  
-d all except session leaders         -g by session OR by effective group name
  
-e all processes                      -p by process ID
  
Tall processes on this terminal   -s processes in the sessions given
  
aall w/ tty, including other users-t by tty
  
gOBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
  
ronly running processes             Uprocesses for specified users
页: [1]
查看完整版本: 利用ansible modules模块来自定义集群管理