소스 검색

rewrite failed_when condition for pg_restore

Grega Bremec 1 개월 전
부모
커밋
2aa5ae9e11
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      playbooks/33-clair-deploy.yml

+ 2 - 2
playbooks/33-clair-deploy.yml

@@ -254,8 +254,8 @@
             state: started
           register: clair_import
           ignore_errors: yes
-          failed_when: "FATAL" in clair_import.stderr_lines
-          # TODO: probably use a regex here
+          failed_when:
+            - (clair_import.stderr | regex_search('FATAL')) is defined
 
         - debug: var=clair_import