0
私はansibleで声明、 私のコードスニペットは、次のようになりますときに変数を使用しようとしています:私にしてみましょう「いつ」のステートメントで変数を使用するか
The offending line appears to be:
version={{ bld_env }}
when: "{{ bld_env }}" == "rc"
^here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
:として
- name: git repo for non prod env
git:
repo=http://url/repo.git
dest=/opt/dest
version={{ bld_env }}
when: ("{{ bld_env }}" == "rc") or ("{{ bld_env }}" == "sandbox") or ("{{ bld_env }}" == "dev") or ("{{ bld_env }}" == "qa")
これが動作し、エラーを与えていません私が間違っている場所を知っている。
に書かれているように動作している...ありがとう! :) –