configuration - Ansible-playbook:直接运行处理程序

标签 configuration ansible ansible-playbook

有没有办法通过 ansible-playbook 直接运行处理程序? ?

例如,我有处理程序 restart service在我的角色中,有时我只想直接触发它而不部署整个应用程序。

最佳答案

a similar post on ServerFault 中回答了许多选项.总之:

触发特定处理程序的选项:

  • 使用空操作 command触发它
  • 使用 debugchanged_when: true触发它

  • 触发所有处理程序的选项:
  • 运行 --force-handlers
  • 使用 meta: flush_handlers任务

  • 重新架构的选项:
  • 改用任务
  • 关于configuration - Ansible-playbook:直接运行处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40139757/

    相关文章:

    android - 如何在 Eclipse 中更改 Android 控制台的字体?

    Ansible:运行失败的任务

    c# - Core 2.0如何在ConfigurationBuilder中设置BasePath

    class - 在 SilverStripe 中存储针对类的配置设置

    java - 尝试在 Hadoop 中开始作业时出错

    amazon-ec2 - Ansible Timeout (12s) 等待提权提示

    ansible - 为不同的主机使用不同的文件

    ansible - 使用 --diff 运行时如何防止 git 任务显示差异?

    ansible - 在 Digital Ocean 上的 Ubuntu 14.04 上使用 Ansible 设置 Mesos

    带有多个引号的 Ansible 多行字符串