github.com/smithx10/nomad@v0.9.1-rc1/e2e/affinities/input/multiple_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 = 100 9 } 10 group "test1" { 11 count = 4 12 affinity { 13 attribute ="${node.datacenter}" 14 operator = "=" 15 value = "dc1" 16 weight = 100 17 } 18 task "test" { 19 driver = "raw_exec" 20 21 config { 22 command = "bash" 23 args = ["-c", "sleep 15000"] 24 } 25 } 26 } 27 }