SHARE
TWEET

fedorm

a guest Jan 22nd, 2019 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fatal: [3.17.159.156]: FAILED! => {"changed": false, "msg": "AnsibleError: template error while templating string: unexpected char u'$' at 2247. String: job \"coupons-processing\" {\n\n  datacenters = [\"dc1\"]\n\n  type = \"system\"\n\n  update {\n    max_parallel = 1\n    min_healthy_time = \"30s\"\n    healthy_deadline = \"5m\"\n    auto_revert      = true\n  }\n\n  group \"processing\" {\n    task \"processing\" {\n      driver = \"docker\"\n\n      config {\n        image = \"artifactory.setmachine.ru:5000/coupon-processing/psql:localtest\"\n\n        auth {\n          username = \"admin\"\n          password = \"tc324012\"\n        }\n\n        port_map = {\n          http = 8008,\n          tcp = 5432\n        }\n\n        dns_servers = [\"${NOMAD_IP_http}\"]\n      }\n\n      env {\n        \"PATRONI_CONSUL_HOST\"=\"${NOMAD_IP_http}:8500\"\n        \"PATRONI_NAME\"=\"dbnode_${NOMAD_IP_http}\"\n        \"PATRONI_RESTAPI_CONNECT_ADDRESS\"=\"${NOMAD_IP_http}:8008\"\n        \"PATRONI_POSTGRESQL_CONNECT_ADDRESS\"=\"${NOMAD_IP_http}:5432\"\n      }\n\n      service {\n        name = \"dbnode\"\n        tags = [\"dbnode\"]\n        port = \"http\"\n        check {\n          name = \"alive\"\n          type = \"tcp\"\n          interval = \"10s\"\n          timeout = \"2s\"\n        }\n      }\n\n      resources {\n        cpu = 1000\n        memory = 1500\n        network {\n          port \"http\" {\n            static = \"8008\"\n          },\n          port \"tcp\" {\n            static = \"5432\"\n          }\n        }\n      }\n    }\n\n    task \"haproxy\" {\n      driver = \"docker\"\n\n      config {\n        image = \"haproxy:alpine\"\n\n        port_map = {\n          http_5000 = 5000,\n          http_5001 = 5001,\n          http = 80\n        }\n\n        volumes = [\n          \"haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg\"\n        ]\n\n        dns_servers = [\"${NOMAD_IP_http}\"]\n      }\n\n      template {\n        data = <<EOH\n      \tglobal\n    \tmaxconn 500\n\n\t\tdefaults\n    \t\tlog\tglobal\n    \t\tmode tcp\n    \t\tretries 2\n    \t\ttimeout client 30m\n    \t\ttimeout connect 4s\n    \t\ttimeout server 30m\n    \t\ttimeout check 5s\n\n\t\tfrontend f_master_postgresql\n    \t\tbind *:5000\n    \t\tdefault_backend b_master_postgresql\n\n\t\tfrontend f_slave_postgresql\n    \t\tbind *:5001\n    \t\tdefault_backend b_replica_postgresql\n\n\t\tbackend b_master_postgresql\n    \t\toption httpchk OPTIONS /master\n    \t\thttp-check expect status 200\n    \t\tdefault-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions\n            {{range $i, $services := service \"dbnode\"}}\n                server dbnode{{ $i | add 1 }} {{.Address}}:5432 maxconn 200 check port 8008{{ end }}\n\n\n\t\tbackend b_replica_postgresql\n    \t\toption httpchk OPTIONS /replica\n    \t\thttp-check expect status 200\n    \t\tdefault-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions\n            {{range $i, $services := service \"dbnode\"}}\n                server dbnode{{ $i | add 1 }} {{.Address}}:5432 maxconn 200 check port 8008{{ end }}\n      \tEOH\n\n        destination = \"haproxy.cfg\"\n      }\n\n      service {\n        name = \"haproxy\"\n        tags = [ \"global\", \"lb\", \"urlprefix-/haproxy\" ]\n        port = \"http\"\n        check {\n          name = \"alive\"\n          type = \"tcp\"\n          interval = \"10s\"\n          timeout = \"2s\"\n        }\n      }\n\n      resources {\n        cpu = 1000\n        memory = 1500\n        network {\n          port \"http_5000\" {\n            static = \"5000\"\n          },\n          port \"http_5001\" {\n            static = \"5001\"\n          },\n          port \"http\" {\n            static = 80\n          }\n        }\n      }\n    }\n  }\n}\n"}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top