diff --git a/CHANGELOG.md b/CHANGELOG.md index f42bf8a..b904790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.1.24 + +* modified **download** resource to use **curl** instead of **wget** +* fix magic hash fact + ## 0.1.23 * simplified **eypconf** fact generation diff --git a/lib/facter/eypconf_generic_id.rb b/lib/facter/eypconf_generic_id.rb index fbae07d..d44c20b 100644 --- a/lib/facter/eypconf_generic_id.rb +++ b/lib/facter/eypconf_generic_id.rb @@ -4,7 +4,11 @@ genetic_id = Facter::Util::Resolution.exec("bash -c 'cat /opt/eypconf/id/#{i}'").to_s if i[0]=='.' then - fact_name=i[1..-1] + if i == ".magic" then + fact_name="magic_hash" + else + fact_name=i[1..-1] + end else fact_name=i end diff --git a/lib/puppet/provider/download/download_linux.rb b/lib/puppet/provider/download/download_linux.rb index 3c23a1e..13e1d69 100644 --- a/lib/puppet/provider/download/download_linux.rb +++ b/lib/puppet/provider/download/download_linux.rb @@ -16,10 +16,10 @@ def check_created_file(file) end def run_wget_command(url) - - command = ["wget"] + #curl https://yum.puppet.com/puppet5/puppet5-release-el-7.noarch.rpm --create-dirs -o /tmp/prova/cosa/rpm + command = ["curl"] command.push(url) - command.push("-O ", resource[:creates]) + command.push("--create-dirs", "-o ", resource[:creates]) if resource[:cwd] Dir.chdir resource[:cwd] do diff --git a/lib/puppet/type/download.rb b/lib/puppet/type/download.rb index 711797f..a4c7976 100644 --- a/lib/puppet/type/download.rb +++ b/lib/puppet/type/download.rb @@ -23,7 +23,7 @@ def retrieve def sync output, status = provider.run_wget_command(value) - self.fail("Error executing wget; returned #{status}: '#{output}'") unless status == 0 + self.fail("Error executing curl; returned #{status}: '#{output}'") unless status == 0 end end diff --git a/metadata.json b/metadata.json index fbba535..c556fa7 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "eyp-eyplib", - "version": "0.1.23", + "version": "0.1.24", "author": "eyp", "summary": "Utility functions for puppet modules", "license": "Apache-2.0",