ansible-community / ansible-nomad

:watch: Ansible role for Nomad
https://galaxy.ansible.com/brianshumate/nomad
BSD 2-Clause "Simplified" License
297 stars 165 forks source link

Fix Nomad 1.7.x compatibility issue #190

Closed sas1024 closed 8 months ago

sas1024 commented 8 months ago

Fix for https://github.com/ansible-community/ansible-nomad/issues/179 issue

stoneus commented 8 months ago

Perfect!

madsboddum commented 8 months ago

Looks good to me.

rndmh3ro commented 8 months ago

Does this still work with versions older than 1.7?

sas1024 commented 8 months ago

@rndmh3ro yes, it works with all Nomad versions above 0.8.x

rndmh3ro commented 8 months ago

Thanks, just tested it myself:

cat /tmp/test-nomad.yml
data_dir  = "/var/lib/nomad"

bind_addr = "0.0.0.0" # the default

advertise {
  # Defaults to the first private IP address.
  http = "1.2.3.4"
  rpc  = "1.2.3.4"
  serf = "1.2.3.4:5648" # non-default ports may be specified
}

server {
  enabled          = true
  bootstrap_expect = 3
}

client {
  enabled       = true
}

plugin "raw_exec" {
  config {
    enabled = true
  }
}

consul {
  address = "1.2.3.4:8500"
  tags = []
}

segu:[~/dev/tmp]:
> ./nomad -version
Nomad v1.5.0
BuildDate 2023-03-01T10:11:42Z
Revision fc40c491cacec3d8ec3f2f98cd82b9068a50797c
segu:[~/dev/tmp]:
> ./nomad config validate /tmp/test-nomad.yml
Configuration is valid!
segu:[~/dev/tmp]:
> nomad -version
Nomad v1.7.5
BuildDate 2024-02-13T15:10:13Z
Revision 5f5d4646198d09b8f4f6cb90fb5d50b53fa328b8
segu:[~/dev/tmp]:
> nomad config validate /tmp/test-nomad.yml
WARNING: mTLS is not configured - Nomad is not secure without mTLS!
Configuration is valid!