I would like to check for the existence of a template file and if that
template exists, use it otherwise move on. The file would obviously need to
exist on the Puppet server, not the client. Here is my code.
$filetest =
>> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/$hostname.e
You cannot use ruby code in Puppet directly, which is why this isn't
working for you.
To do this you would need to write a "Puppet Function" as documented at
http://docs.puppetlabs.com/guides/custom_functions.html. This would then
let you do something like:
if exists('/file') {
Functions always
This line here:
> content => template("samba/smb.erb", "samba/${hostname}.erb"),
What is your intention with having multiple .erb files per hostname? That might
help us figure if there a different solution is warranted.
-Rilindo
On Aug 7, 2013, at 3:20 PM, Ted Fiedler wrote:
> I would like t
I have a base Samba config and then about 50 server specific samba shares.
So I apply a base config to all the servers, then if that server has extra
shares that are not in the base, it is included.
On Wednesday, August 7, 2013 5:01:19 PM UTC-4, RIlindo Foster wrote:
>
> This line here:
>
> > c