{"id":13990,"date":"2019-12-05T17:57:34","date_gmt":"2019-12-05T17:57:34","guid":{"rendered":"http:\/\/shivaprogramming.com\/blog\/?p=13990"},"modified":"2019-12-06T19:51:22","modified_gmt":"2019-12-06T19:51:22","slug":"download-remote-file-and-extract-file-using-puppet-in-windows","status":"publish","type":"post","link":"http:\/\/shivaprogramming.com\/blog\/download-remote-file-and-extract-file-using-puppet-in-windows\/","title":{"rendered":"Download remote zip, extract zip and copy files using puppet in windows"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>#download file from repo\n download_file { 'Download dotnet 4.0' :\n  url                   => 'https:\/\/repos.shivaprogramming.com\/Myapp.ZIP',\n  destination_directory => 'D:\\downloadapp',\n}\n\n#extract zip\n exec { 'Unzip Folder':\n        command =>'Expand-Archive -Path D:\\downloadapp\\Myapp.ZIP -DestinationPath D:\\downloadapp\\DEST',\n        provider  => powershell,\n        logoutput =>    true,\n        subscribe => Download_file['Download dotnet 4.0'],\n    } \n#copy resources to the destination\n \n file { 'D:\\CA_Websites\\MyApp':  #destination\n ensure    => 'directory',\n recurse   => true,\n source    => 'D:\\downloadapp\\DEST',\n subscribe => Exec['Unzip Folder'],\n  }\n\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-13990","post","type-post","status-publish","format-standard","hentry","category-puppet-configuration-management-tool"],"_links":{"self":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/13990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/comments?post=13990"}],"version-history":[{"count":5,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/13990\/revisions"}],"predecessor-version":[{"id":13996,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/13990\/revisions\/13996"}],"wp:attachment":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/media?parent=13990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/categories?post=13990"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/tags?post=13990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}