【发布时间】:2015-12-23 06:27:03
【问题描述】:
我有一个具有以下值的变量:
name_prefix: stage-dbs
我的剧本中有一个任务,它必须检查这个变量并查看它是否包含 *-dbs ,如果满足条件,那么它应该处理。我写了这样的东西:
- name: Ensure deployment directory is present
file:
path=/var/tmp/deploy/paTestTool
state=directory
when: name_prefix =="*-dbs" # what condition is required here to evaulate the rest part of variable??
这里应该使用什么正则表达式模式或如何使用正则表达式?
【问题讨论】:
标签: regex ansible ansible-playbook