diff --git a/hieradata/roles/infra/nomad/agentv2.yaml b/hieradata/roles/infra/nomad/agentv2.yaml index 434016a..38c34a8 100644 --- a/hieradata/roles/infra/nomad/agentv2.yaml +++ b/hieradata/roles/infra/nomad/agentv2.yaml @@ -25,6 +25,7 @@ profiles::packages::include: consul-cni: {} profiles::nomad::node::client: true +profiles::nomad::node::node_pool: common profiles::nomad::node::host_volumes: - name: puppetclient_crt path: /etc/puppetlabs/puppet/ssl/certs/%{facts.networking.fqdn}.pem diff --git a/site/profiles/manifests/nomad/node.pp b/site/profiles/manifests/nomad/node.pp index 845c3d2..e00f285 100644 --- a/site/profiles/manifests/nomad/node.pp +++ b/site/profiles/manifests/nomad/node.pp @@ -10,6 +10,7 @@ class profiles::nomad::node ( String $user = 'nomad', String $group = 'nomad', Array $host_volumes = [], + String $node_pool = 'default', ){ if $manage_user { diff --git a/site/profiles/templates/nomad/config.hcl.erb b/site/profiles/templates/nomad/config.hcl.erb index 2298732..d4aea47 100644 --- a/site/profiles/templates/nomad/config.hcl.erb +++ b/site/profiles/templates/nomad/config.hcl.erb @@ -21,6 +21,7 @@ server { # Manage clients/agents client { enabled = true + node_pool = "<%= @node_pool %>" <%- @host_volumes.each do |volume| %> host_volume "<%= volume['name'] %>" {