我正在嘗試創建一個正則表達式,該正則表達式匹配URL中的任何特殊字符,然後在其前面添加轉義字符\。我創建了以下正則表達式,它正確捕獲字符串中正確的字符,但它不會在特殊字符前添加\。 For example - test-google.com would look like test\-google\.com - hosts: localhost
vars:
site: "tes
這些變量是通過從YAML文件加載它們作爲extra_args傳遞的。 我曾嘗試以下,但它不工作: - name: Check if variable are of type boolean
fail:
msg: "Variable '{{ item }}' is not a boolean"
when: item is not bool
with_items