Browse Source

quote password environment variable in case it contains shell metacharacters

Ben Morse 10 years ago
parent
commit
869e73fa4d
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      roles/mailserver/handlers/main.yml

+ 1
- 2
roles/mailserver/handlers/main.yml View File

@@ -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…
Cancel
Save