Skip to content

How to get name in job template? #724

@masterjg

Description

@masterjg
      --name=<string>
        If set, this will be the unique identifier of this deployed instance
        of the specified pack. If not set, the pack name will be used. This
        is useful for running more than one instance of a pack within the same
        cluster. Note that this name must be globally unique within a cluster.
        Running the run command multiple times with the same name, will just
        re-submit the same pack, and apply changes if you have made any to
        the underlying pack. Be mindful that, whether you have made changes
        or not, the underlying Allocations will be replaced. When managing
        packs, the name specified here is the name that should be passed to
        nomad-pack's plan and destroy commands.

How do you get value in job template of this argument?
I know I can get meta (ie [[ meta "pack.name" . ]]) and vars (ie [[ var "id" . ]]) but no info on how to get unique identifier passed as --name=.

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions