zoukankan      html  css  js  c++  java
  • rex run

     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
    ";
      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.3
    ddad2313
    node2
    
    就是这个方法
    

  • 相关阅读:
    银行业务调度系统
    交通灯管理系统
    Java高新技术
    Java反射机制
    java的集合框架
    正则表达式
    IPD CBB
    TCP的可靠传输(依赖流量控制、拥塞控制、连续ARQ)
    等价类划分
    Pycharm常用配置汇总
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349717.html
Copyright © 2011-2022 走看看