Commit 4d087472 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Merge branch 'dev' into 'master'

Remove references to Vault

See merge request !4
parents 4f5da49e 498863ef
Pipeline #3020928 passed with stages
in 1 minute and 19 seconds
......@@ -4,7 +4,6 @@ job "${PREFIX}_hello" {
type = "batch"
periodic {
// Launch every minute
cron = "${SCHEDULE}"
time_zone = "Europe/Zurich"
prohibit_overlap = true
......@@ -20,22 +19,12 @@ job "${PREFIX}_hello" {
type = "gelf"
config {
gelf-address = "udp://127.0.0.1:12201"
env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB"
env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX"
tag = "${PREFIX}_hello"
}
}
}
vault {
policies = ["nomad_write"]
}
template {
data = <<EOF
NOMAD_TOKEN="{{ with secret "nomad/creds/write" }}{{.Data.secret_id}}{{end}}"
EOF
destination = "secrets/nomad_token.env"
env = true
}
env {
NOMAD_ADDR = "$NOMAD_ADDR"
}
......
......@@ -17,9 +17,9 @@ def error(**kwargs):
log(**kwargs)
try:
nomad_token = os.environ['NOMAD_TOKEN']
nomad_addr = os.environ['NOMAD_ADDR']
except KeyError:
error(comment='Error obtaining Nomad token!')
error(comment='Error obtaining Nomad address!')
sys.exit(1)
log(comment='Hello world!')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment