mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
nomad: re-enable tests (#11956)
* nomad: re-enable tests
* test(nomad): revamp integration tests
- bump nomad to 2.0.0
- update job.hcl to Nomad 1.x+ HCL syntax
- add macOS support: skip unzip install on Darwin, add arm64/aarch64 arch mapping
- skip Alpine in aliases instead of runtime gate in main.yml
- move nomad_version/nomad_cmd/nomad_uri/arch_map to role vars
- flatten block structure
---------
(cherry picked from commit 7b05c05205)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
639 B
HCL
38 lines
639 B
HCL
# Copyright (c) Ansible Project
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
job "example" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
group "cache" {
|
|
count = 1
|
|
|
|
network {
|
|
port "db" {}
|
|
}
|
|
|
|
restart {
|
|
attempts = 2
|
|
interval = "30m"
|
|
delay = "15s"
|
|
mode = "fail"
|
|
}
|
|
|
|
task "redis" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "redis:7"
|
|
ports = ["db"]
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
}
|
|
}
|
|
}
|
|
}
|