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.


Reply via email to