Re: [Puppet Users] Deployed but unmanaged file

Craig White
Wed, 29 Jun 2011 16:03:56 -0000

That''s what I was thinking too but I worry that someone may feel
compelled to tidy things up     ;-)

I can see it now...

echo "Delete me and you will die" >
/root/firebird_security_file_deployed_do_not_delete

Craig

On Jun 29, 2011, at 9:00 AM, Aaron Grewell wrote:

> I''d be tempted to write another file as well as part of the
initial config (/var/lib/firebird/configured or something), then check for its
(non)existence before pushing the file out.
>
> On Wed, Jun 29, 2011 at 8:34 AM, Craig White <craig.white@ttiltd.com>
wrote:
> This seems to work but it does seem perilous and ugly. A meta description
of what I am trying to do is:
> - install firebird sql server
> - replace the ''security'' file with a known file
> - restart the firebird service
>
> I''m not going to include firebird::install class because the part
that worries me is that I can''t work on
/var/lib/firebird/2.1/system/security.fdb directly because we will want to
maintain it locally after installation. I only want a single shot deploy. So I
am linking to /root/security.fdb and then copying it from there to it''s
home. I suppose there is a much better way to do this but I haven''t
found it.
>
> My worry is that I never actually overwrite
/var/lib/firebird/2.1/system/security.fdb after the initial install/configure
phase is completed.
>
> class firebird::configure {
>  file {"/root/security.fdb":
>    source => "puppet:///modules/firebird/security.fdb",
>    owner    => root,
>    group    => root,
>    mode     => 640,
>    replace  => false,
>  }
>  exec { "Copy KNOWN security.fdb into position":
>    path        =>
"/usr/local/bin:/usr/local/sbin:/bin:/usr/bin",
>    environment => "HOME=/root",
>    command     => "/bin/cp /root/security.fdb
/var/lib/firebird/2.1/system",
>    user        => "root",
>    group       => "root",
>    logoutput   => on_failure,
>    require  => Class["firebird::install"],
>  }
> }
>
> Is there a better way?
>
> --
> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  craig.white@ttiltd.com
> 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 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.
>
>
>
> --
> 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.

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired
success? Let us help!