【问题标题】:ansible how to compare two stringsansible如何比较两个字符串
【发布时间】:2022-01-22 23:33:23
【问题描述】:

您能否向我解释一下如何比较值 - Ansible 中的字符串以设置正确的变量?

  - name: Set directory
    set_fact:
      full_directory: "{{ directory }}/{{folder}}"
    when: 
      "{{ test }}"" == "string"

【问题讨论】:

标签: ansible


【解决方案1】:

如果测试是一个变量

when: test == "string"

【讨论】:

    猜你喜欢
    • 2022-06-29
    • 2019-01-14
    • 1970-01-01
    • 1970-01-01
    • 2013-09-27
    • 2021-07-05
    • 2019-09-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多