Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Configure GCE instances after GCE-tags with hiera

$
0
0
Hi, I have just started with GCE. I noticed that you can specify certain tags to your instances. I would like that for example all instances that are tagged with the tag "webserver" will get the webserver.yaml file included with hiera. My hiera.yaml looks as follow. --- :backends: - yaml :hierarchy: - 'fqdn/%{fqdn}' - 'hostname/%{hostname}' - 'operatingsystem/%{operatingsystem}/tags/%{gce.instance.tags}' - 'operatingsystem/%{operatingsystem}/role/%{role}' - 'operatingsystem/%{operatingsystem}/common' :yaml: :datadir: '/path/to/hiera/datadir/' :merge_behavior: :deeper ---- So if I put a yaml file in the operatingsystem/%{operatingsystem}/tags/%{gce.instance.tags}/ folder called webserver.yaml and I have added the tag webserver to that specific instance it will pick up that yaml file and apply the configuration. Thanks in advance - Alexander

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>