簡體   English   中英

ansible 如何比較兩個字符串

[英]ansible how to compare two strings

您能否向我解釋一下如何比較值 - Ansible 中的字符串以設置正確的變量?

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

如果測試是一個變量

when: test == "string"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM