zoukankan      html  css  js  c++  java
  • ansible判断对指定主机组执行task , when: inventory_hostname in {{ groups['group'] }} does not work with dynamic inventory

    So just did a lot of experimenting and found

    Works:

    when: inventory_hostname in groups['group']

    Fails:
    when: inventory_hostname in {{ groups['group'] }}

    So it is the extra set of {{ }} that causes the problem. Although I don't know why it works for static but not for dynamic.

    参考:https://github.com/ansible/ansible/issues/11371

  • 相关阅读:
    HTML5
    HTML5
    HTML5
    HTML5
    HTML5
    HTML5
    HTML5
    HTML5
    HTML5
    53.Maximum Subarray
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/12166824.html
Copyright © 2011-2022 走看看