job "consul-warden" { datacenters = ["dc1"] type = "service" priority = 50 constraint { attribute = "${node.unique.name}" value = "warden" } group "consul" { count = 1 task "consul" { driver = "exec" config { command = "consul" args = ["agent", "-dev", "-client=0.0.0.0", "-data-dir=/tmp/consul-data"] } resources { cpu = 200 memory = 256 network { port "http" { static = 8500 } } } service { name = "consul" port = "http" check { type = "http" path = "/v1/status/leader" port = "http" interval = "10s" timeout = "2s" } } } } }