On Jun 28, 2011, at 1:01 PM, Craig White wrote:
> I think that the heat must be affecting me because this seems so simple but
> it's eluded me for too long now.
>
> What I am trying to do is create a symlink from one directory to another
> AFTER the package is installed.
>
> The error:
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Invalid parameter mode at
> /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet
>
> Which I gather means that it can't create the symbolic link to a directory
> that doesn't exist yet but it could be my syntax and I have
> checked/rechecked/simplified but still...
Do you have a root firebird class? In your init.pp for the firebird module, you
might consider adding something like this to create the dependency order you're
looking at.
Class['firebird::install'] -> Class['firebird::service']
All items in the firebird::install class will happen before the
firebird::service class.
>
> class firebird::install {
> package { "firebird2.1-classic":
> name => "firebird2.1-classic",
> ensure => installed,
> # require => Class["firebird::configure"],
> notify => Class["firebird::service", "firebird::configure"],
> }
> package { "firebird2.1-dev":
> name => "firebird2.1-dev",
> ensure => installed,
> }
> }
>
> class firebird::service {
> service { "firebird2.1-classic":
> ensure => running,
> hasstatus => true,
> hasrestart => true,
> enable => true,
> }
Also, does the service start require the symlink to exist before you start the
service? you might want to consider adding a dependency here as well. Maybe a
'require => Exec['Create symlink for /var/fbdata'],'
> exec { "Create symlink for /var/fbdata":
> path => "/usr/local/bin:/usr/local/sbin:/bin:/usr/bin",
> environment => "HOME=/root",
> user => "root",
> group => "root",
> mode => 755,
> command => "/bin/ln -s /var/lib/firebird/2.1/data /var/fbdata",
> refresh => false,
> # unless => "/bin/ls -l /var/fbdata",
> logoutput => on_failure,
> }
> }
Any reason this is an Exec as opposed to using the file resource to accomplish
this for you?
file { '/var/fbdata':
ensure => link,
target => '/var/lib/firebird/2.1/data
}
>
> --
> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [email protected]
> 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com
>
> Need help communicating between generations at work to achieve your desired
> success? Let us help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.