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

Changing owner dynamically

$
0
0
I'm pretty new to puppet and have the below configuration setup on my master node, I know it's not the standard "module structure" but this fits my needs better. I want to apply the sh_lib.pp manifest to all nodes but under different owners per node. Is there anyway I can set the owner attribute as a variable in sh_lib.pp and then set it per node in site.pp rather than having to put the whole code into site.pp for each node ? Many thanks. **/etc/puppet/manifests/site.pp** node default { # Apply to all nodes } node servername1 { # User is usr01 import 'sh_lib.pp' } node servername2 { # User is usr02 import 'sh_lib.pp' } **/etc/puppet/manifests/sh_lib.pp** file { "/path/to/target_dir": ensure => directory, recurse => remote, owner => ???, mode => 0755, source => "puppet:///svn_trunk/sh_lib" } Using puppet version 3.8.7.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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