rex run

来源:互联网 发布:mysql结构化查询语言 编辑:程序博客网 时间:2024/04/29 23:03
 task "mytask1","192.168.137.3", sub {   say run "hostname"; };run 函数是在哪里呢?Rex::Commands::Run - 执行远程命令[root@node01 Rex]# perldoc -l Rex::Commands::Run /usr/local/perl/lib/site_perl/5.22.1/Rex/Commands/Run.pm加入一段:sub run {   print "ddad2313\n";  my $cmd = shift;[root@node01 Rex]# rex mytask1[2017-05-12 12:58:12] WARN - Please use only the following characters for task names:[2017-05-12 12:58:12] WARN -   A-Z, a-z, 0-9 and _[2017-05-12 12:58:12] WARN - Also the task should start with A-Z or a-z[2017-05-12 12:58:12] WARN - You can disable this warning by setting feature flag: disable_taskname_warning[2017-05-12 12:58:12] WARN - Please use only the following characters for task names:[2017-05-12 12:58:12] WARN -   A-Z, a-z, 0-9 and _[2017-05-12 12:58:12] WARN - Also the task should start with A-Z or a-z[2017-05-12 12:58:12] WARN - You can disable this warning by setting feature flag: disable_taskname_warning[2017-05-12 12:58:12] WARN - Please use only the following characters for task names:[2017-05-12 12:58:12] WARN -   A-Z, a-z, 0-9 and _[2017-05-12 12:58:12] WARN - Also the task should start with A-Z or a-z[2017-05-12 12:58:12] WARN - You can disable this warning by setting feature flag: disable_taskname_warning[2017-05-12 12:58:12] INFO - Running task mytask1 on 192.168.137.3ddad2313node2就是这个方法

原创粉丝点击