소스 검색

quote password environment variable in case it contains shell metacharacters

Ben Morse 10 년 전
부모
커밋
869e73fa4d
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    2
      roles/mailserver/handlers/main.yml

+ 1
- 2
roles/mailserver/handlers/main.yml 파일 보기

@@ -11,6 +11,5 @@
11 11
   service: name=tomcat6 state=restarted
12 12
 
13 13
 - name: import sql postfix
14
-  action: shell PGPASSWORD={{ mail_db_password }} psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1
14
+  action: shell PGPASSWORD='{{ mail_db_password }}' psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1
15 15
   notify: restart postfix
16
-

Loading…
취소
저장