On Tue, 12 Jul 2011 13:19:34 -0700, vella1tj wrote:
> 
> Hi, I am trying run a package once and when it completes I want my
> manifest to create a touch file and from that file being placed there
> it will not run again. I have this so far, but have been running into
> syntax problems/invalid parameters.
> 
> 
> #Package to install
>  package { 'Bindscript20100601.dmg':
>    provider    => pkgdmg,
>    ensure      => installed,
>    source      => 'temp/location/rightnow/Bindscript20100601.dmg',
>    notify      => [Exec['blahblah']],
>    onlyif      => "test -e /var/db/.bindscript",
> }
>   exec {'blahblah':
>    command     =>'touch /var/db/.bindscript',
>    path        =>['/usr/bin']
> }
> 
> If you need more information please ask.
> 

Couple of things.

onlyif is only valid on exec resources.

This shouldn't actually be necessary.  The pkgdmg provider should keep
track of which things it's installed, so it won't keep trying to install
the .dmg on every run.

Is the following resource definition not working for you?

  package { 'Bindscript20100601.dmg':
     provider => pkgdmg,
     ensure   => installed,
     source   => 'temp/location/rightnow/Bindscript20100601.dmg',
  }

-- 
Jacob Helwig
,----
| Join us for PuppetConf, September 22nd and 23rd in Portland, OR
| http://bit.ly/puppetconfsig
`----

Attachment: signature.asc
Description: Digital signature

Reply via email to