Hi, No, you can only declare the state of a resource once. It can't be present and absent at the same time.
Den On 21/08/2011, at 8:50, Brian Troutwine <br...@troutwine.us> wrote: > PEBKAC, all. > > My images were already tainted with 01proxy, so it existed before the > installation of the apt-cacher. Question: is it possible to set a > precondition on a resource, say to ensure that a file _doesn't_ exist before > installation of a package? > > On Sat, Aug 20, 2011 at 5:38 PM, Brian Troutwine <br...@troutwine.us> wrote: > I also note that the following fails to order as I expect: > > class base { > if $hostname == 'apt' { > file { '/etc/apt/apt.conf.d/01proxy': > ... > require=> Package['apt-cacher'], > notify => Service['apt-cacher'], > } > ... > } > } > > node 'apt.example.com' { > include base, aptcacher > } > > 01proxy is placed in the filesystem before the Package apt-cacher is > installed or the Service apt-cacher started. > > On Sat, Aug 20, 2011 at 3:34 PM, Brian Troutwine <br...@troutwine.us> wrote: > I meant to include more material and have inserted it inline below. My > apologies. > > On Sat, Aug 20, 2011 at 3:31 PM, Brian Troutwine <br...@troutwine.us> wrote: > Hello, all. > > I have a module for apt-cacher and a node definition something like this: > > class base { > file { '/etc/apt/apt.conf.d/01proxy': > ... > } > } > > node 'apt.example.com' { > include base, aptcacher > > Class['aptcacher'] -> File['/etc/apt/apt.conf.d/01proxy'] > } > > I'm attempting, on the apt server, to ensure that the apt proxy is installed > _before_ the reference to it being a proxy is made, else I can't install the > silly thing. However, this dependency forcing fails and the proxy reference > file is _sometimes_ installed before the proxy itself. > > Moreover, if I rewrite the dependency as: > > Service['apt-cacher'] -> File['/etc/apt/apt.conf.d/01proxy'] > > there is no change. > > > Why? > > -- > Brian L. Troutwine > > > > > -- > Brian L. Troutwine > > > > > -- > Brian L. Troutwine > > > > > -- > Brian L. Troutwine > > -- > 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.