github.com/bigcommerce/nomad@v0.9.3-bc/e2e/affinities/input/anti_affinities.nomad (about) 1 job "test1" { 2 datacenters = ["dc1", "dc2"] 3 type = "service" 4 affinity { 5 attribute ="${meta.rack}" 6 operator = "=" 7 value = "r1" 8 weight = -50 9 } 10 group "test1" { 11 count = 4 12 affinity { 13 attribute ="${node.datacenter}" 14 operator = "=" 15 value = "dc1" 16 weight = -50 17 } 18 task "test" { 19 driver = "raw_exec" 20 21 config { 22 command = "bash" 23 args = ["-c", "sleep 15000"] 24 } 25 } 26 } 27 }