unfortunately getting a different error now

----------------------------
err: Failed to apply catalog: Cannot alias File[install] to
["c:/install.bat"] at /etc/puppet/modules/rk/manifests/init.pp:8; resource
["File", "c:/install.bat"] already declared at
/etc/puppet/modules/rk/manifests/init.pp:20
---------------------------

my manifests looks like follows
--------------------------------------------------
class rk {

        file { 'install':
        path => "c:\install.bat",
        ensure  => present,
        content => template("rk/inst.txt"),
        notify  => Exec['install_sw']
        }
        exec {'install_sw':
        command => "c:\install.bat",
        timeout => 0,
        require => File['install'],
        notify => File['remove']
        }

        file { 'remove':
        ensure  => absent,
        path => "c:\install.bat",
        require => Exec['install_sw']
        }
}
-----------------------------------------------

I am quite sure that there is something syntactically wrong my code but
donno what? Can someone please shed some light on this?

Thanks & Regards,

Rakesh K.

On Wed, Feb 20, 2013 at 10:32 AM, Rakesh Kathpal <rkath...@gmail.com> wrote:

> 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