【问题标题】:to run autosys command with start argument in ansible playbook在 ansible playbook 中使用 start 参数运行 autosys 命令
【发布时间】:2020-02-10 18:52:04
【问题描述】:

如何在 linux 服务器上执行带有 start 参数的 autosys 命令:当我这样做时:service autosys start 它不起作用,我只能从 /etc/init.d 执行它:./waae_agent-autosys_dev start|stop|restart

在我写的时候在 ansible playbook 中:shell: "/etc/init.d/waae_agent-autosys_dev restart"

它不会启动它,但它是我们从命令行启动它的唯一方式。

【问题讨论】:

    标签: ansible


    【解决方案1】:

    试试这个:

    - name: "Restart waae_agent-autosys_dev"
      service:
        name: waae_agent-autosys_dev
        state: restarted
    

    【讨论】:

      猜你喜欢
      • 2013-12-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多