thanks a ton.. I will give it  try and revert...

On Tue, Feb 19, 2013 at 7:58 PM, Bernd Adamowicz <
bernd.adamow...@esailors.de> wrote:

> You could try:****
>
> ** **
>
>
>         file { ‘delete-install-bat’:
>         ensure  => absent,****
>
> path => ‘c:\install.bat’,****
>
> require => Exec[‘install’],
>         }****
>
> ** **
>
> Cheers,****
>
> Bernd****
>
> *From:* puppet-users@googlegroups.com [mailto:
> puppet-users@googlegroups.com] *On Behalf Of *Rakesh Kathpal
> *Sent:* Dienstag, 19. Februar 2013 15:22
> *To:* puppet-users@googlegroups.com
> *Subject:* [Puppet Users] Question Windows manifests****
>
> ** **
>
> Hi,
>
> I am creating a file resouce which is bat file, and I am running the file
> to perform some operation.
>
> I need to know how do I delete the file after the operation is
> performed... the code I tried is as follows
>
> class rk{
>
>         file { "c:\install.bat":
>         ensure  => present,
>         content => template("rk/inst.txt"),
>         notify  => Exec['install']
>         }
>         exec {'install':
>         command => "c:\install.bat",
>         timeout => 0,
>         require => File['c:\install.bat'],
>         }
>
>         file { "c:\install.bat":
>         ensure  => absent,
>         }
> }
>
> Now it gives me a duplicate declaration error for resource file.... I
> understand its very logical to get this error but can someone please give
> some pointers to resolve this issue.
>
> Thanks a lot.
>
> Rakesh K.****
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>  ****
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to