Ver código fonte

quote password environment variable in case it contains shell metacharacters

Ben Morse 10 anos atrás
pai
commit
869e73fa4d
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1
    2
      roles/mailserver/handlers/main.yml

+ 1
- 2
roles/mailserver/handlers/main.yml Ver arquivo

@@ -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
-

Carregando…
Cancelar
Salvar