Hi
I am developing a module to create a simple nas for my work and I am using
the concat module to assemble /etc/exports and /etc/samba/smb.conf.
I developed my module on my puppet development server and concat worked
like a charm, however when I rolled it out to my live servers if kept on
failing with the following error:
err: Failed to apply catalog: Could not find dependent
Exec[concat_/etc/exports] for
File[/_etc_exports/fragments/2_exports_ART_DATA] at
/etc/puppet/environment/testing/modules/concat/manifests/fragment.pp:48
So to be clear, this works perfectly on my development server, but not on
my live servers. It appears as if it is some kind of dependency issue,
either in the code or with something missing somewhere. I have checked all
the posts I can find and I haven''t found anything close to my problem.
I have tried removing all the code to do with exports and then the problem
moves on to the smb.conf file.
I''m running RHEL5.8 (unfortunately I can''t upgrade to 6 or use
any other
distro) and the latest version of concat from github.
The code is below (I''ve removed some bits not associated with this
problem
to make it smaller):
class nas ($base_path = "/data0") {
realize ( Package["samba3x"] )
service {"smb":
enable => true,
ensure => true,
}
service{"nfs":
enable => true,
ensure => true,
}
concat{"/etc/samba/smb.conf":
require => Package["samba3x"],
}
concat{"/etc/exports":
require => Service["nfs"],
}
concat::fragment{"smb.conf_header":
target => "/etc/samba/smb.conf",
order => 1,
content => template("nas/smb.conf.erb"),
owner => root,
group => root,
mode => 644,
}
concat::fragment{"exports_header":
target => "/etc/exports",
order => 1,
content => "#Do not edit, this file is managed by
Puppet\n",
owner => root,
group => root,
mode => 644,
}
define fileshare($share=$name,
$share_path = "$nas::base_path/$share",
$nfs_clients = "*.mycompany.co.uk",
$nfs_options = "no_root_squash,rw,sync",
$cifs_comment = "Share $share",
$cifs_browseable = yes,
$cifs_writable = yes,
$linux_acls = undef,
) {
concat::fragment{"exports_$share":
target => "/etc/exports",
order => 2,
content => template("nas/exports.erb"),
}
concat::fragment{"smb.conf_$share":
target => "/etc/samba/smb.conf",
order => 2,
content => template("nas/smb_share.erb"),
}
file{$share_path:
ensure => directory,
owner => root,
group => root,
}
}
}
Cheers
Mark
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/NXS9xn-udz4J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
----- Original Message -----> From: "Mark" <mark@omzig.co.nz> > To: puppet-users@googlegroups.com > Sent: Thursday, July 19, 2012 5:01:21 PM > Subject: [Puppet Users] Problem with puppet-concat > > Hi > > > I am developing a module to create a simple nas for my work and I am > using the concat module to assemble /etc/exports and > /etc/samba/smb.conf . > > > I developed my module on my puppet development server and concat > worked like a charm, however when I rolled it out to my live servers > if kept on failing with the following error: > > > > err: Failed to apply catalog: Could not find dependent > Exec[concat_/etc/exports] for > File[/_etc_exports/fragments/2_exports_ART_DATA] at > /etc/puppet/environment/testing/modules/concat/manifests/fragment.pp:48 >this suggests you''re doing a nas::fileshare{..} without doing class{"nas":}. would need to see the code where you''re using the class and define too. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Wow, thanks for the prompt response! I get the idiot of the week award. When I rolled my nas module out to live I missed a line when I moved the node file entries. That line was "include nas". The one thing I didn''t check... Put that back in and it all burst into life. Thanks for your help. On Thursday, July 19, 2012 5:08:11 PM UTC+1, R.I. Pienaar wrote:> > > > ----- Original Message ----- > > this suggests you''re doing a nas::fileshare{..} without doing > class{"nas":}. > > would need to see the code where you''re using the class and define too. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/rv-6nP1E_i0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.