package download using manifest

515 views
Skip to first unread message

Mamta Garg

unread,
Feb 26, 2013, 1:40:25 AM2/26/13
to puppet...@googlegroups.com
Hi All,

Can anyone please tell me if we can download package from website using puppet manifests?
If yes,could you please provide me a example.



--
Thanks and Regards,
Mamta Garg

Jithin Xavier

unread,
Feb 26, 2013, 3:14:19 AM2/26/13
to puppet...@googlegroups.com
Hi Garg,

Yes, you can download package using manifests,

Step1: You have to download wget from puppet labs(if you are using enterprise version, can run this command - puppet module insttall maestrodev/wget (https://github.com/maestrodev/puppet-wget/))
Step2: After install yo can see that package in your /etc/puppetlabs/puppet/modules.
Step3: Inside manifest you can create your custom classes like this ,

class wget::clssName{
         wget::fetch { "packageName":
           source => "url",
           destination => "destination",
           timeout => 0,
           }
}

Thanks
Jxavier



On Tuesday, 26 February 2013 12:10:25 UTC+5:30, Mamta Garg wrote:
Hi All,

Can anyone please tell me if we can download package from website using puppet manifests?
If yes,could you please provide me a example.
i

Mamta Garg

unread,
Feb 26, 2013, 5:06:10 AM2/26/13
to puppet...@googlegroups.com
Hi JIthin,

Thanks for your reply!
I need to install package on my one of the window agent So could you please tell me ,in 'distention' option i should give puppet master path or window's location?

Also i have created a splunk.pp file inside wget\manifests\splunk.pp and added as below.


class wget::splunk{
wget::fetch{"Universal Forwarder":
  source=>"https://www.splunk.com/page/download_track?file=5.0.2/universalforwarder/windows/splunkforwarder-5.0.2-149561-x64-release.msi&platform=Windows&architecture=x86_64&version=5.0.2&typed=release&name=windows_installer&d=pro&elq=e5468912-3573-4b8c-b5db-6d582b318e88",
  destination=>"etc/sourceSplunk",
timeout=>0,
}
}

then added below in init.pp file-


class wget{ include wget::splunk}

After adding above when i am running this on my window agent ,showing below error.



Could you please guide me?


--
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...@googlegroups.com.
To post to this group, send email to puppet...@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.
 
 

Jithin Xavier

unread,
Feb 26, 2013, 5:13:58 AM2/26/13
to puppet...@googlegroups.com
Mamtha,


Destination should be your agent server path. Did you install wget from Puppet,then only this will work for you. And no  need add any entry on your init.pp file.


You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/mvHXlwSB0Xk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.

To post to this group, send email to puppet...@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.
 
 



--
-Regards
Jithin Xavier

Mamta Garg

unread,
Feb 26, 2013, 5:19:44 AM2/26/13
to puppet...@googlegroups.com
 I have installed wget module from puppet on my puppet master (linux-centOS) using command - puppet module insttall maestrodev/wget.
 Do i need to install wget on my window agent also as i need to do installation on window agent?

Please reply!

Jithin Xavier

unread,
Feb 26, 2013, 5:25:09 AM2/26/13
to puppet...@googlegroups.com
Yes, you should do. If you are using Puppet enterprise version,you should add wget claas to your agent(and splunk).

Thanks,
Jithin
Reply all
Reply to author
Forward
0 new messages