Fix echo of stdout for fail_on function

Change-Id: Ie0506c64fae8a751b9e0d858230acc6f576b5b34
diff --git a/influxdb/client.sls b/influxdb/client.sls
index 5ef378e..3015a53 100644
--- a/influxdb/client.sls
+++ b/influxdb/client.sls
@@ -91,7 +91,7 @@
 influxdb_continuous_query_{{db_name}}_{{ cq_name }}:
   cmd.run:
     - shell: /bin/bash
-    - name: fail_on() { echo $2; if [[ "$2" == *"$1"* ]]; then return 1; return 0; fi; }; fail_on "already exist" $({{ curl_command }} -s -S -POST "{{ auth_url }}" --data-urlencode "q=CREATE {{ query_continuous_query }}") || fail_on error $({{ curl_command }} -s -S -POST "{{ auth_url }}" --data-urlencode $'q=DROP {{ cq_name_on }};\nCREATE {{ query_continuous_query }}')
+    - name: fail_on() { echo "${@:2}"; if [[ "${@:2}" == *"$1"* ]]; then return 1; return 0; fi; }; fail_on "already exist" $({{ curl_command }} -s -S -POST "{{ auth_url }}" --data-urlencode "q=CREATE {{ query_continuous_query }}") || fail_on error $({{ curl_command }} -s -S -POST "{{ auth_url }}" --data-urlencode $'q=DROP {{ cq_name_on }};\nCREATE {{ query_continuous_query }}')
     - onlyif: {{ curl_command }} -s -S -POST "{{ auth_url }}" --data-urlencode "q=SHOW DATABASES" | grep {{ db_name }}
 
   {%- endfor %}