Anabilities의 regex_replace 필터에서 리터럴 (점)을 찾을 수 없습니다. 다음 작업은 다음과 같습니다'regex_replace'로 리터럴 일치 가능 필터
- name: Display database name
debug:
msg: "{{ vhost | regex_replace('(.+\.)(.+)$', \\1) }}"
tags: [debug]
내 의도는 일치의 첫 번째 부분 (예에서 테스트)와 test.staging.domain.com 같은 전체 URL을 대체하는 것입니다.
debug:
msg: "{{ vhost | regex_replace('(.+\.)(.+)$', \\1) }}"
^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.
가 어떻게 Ansible regexp_replace
필터의 리터럴을 일치시킬 수 있습니다 :
Ansible 다음과 같은 오류를보고 할 것인가?