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
    
    就是这个方法
    

  • 相关阅读:
    性能优化之_android多线程
    bootstrap搜索样式
    bootstrap模态框通过传值解决重复提交问题
    web请求乱码问题总结
    jsp页面自动换行
    cron表达式
    js中简单操作
    文件上传(前端)
    viz.js操作流程
    graphviz.js划线操作
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349717.html
Copyright © 2011-2022 走看看