]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Merge pull request #576 from yadavnikhil/master master
authorHunter Haugen <hunter@puppetlabs.com>
Thu, 17 Mar 2016 16:25:38 +0000 (09:25 -0700)
committerHunter Haugen <hunter@puppetlabs.com>
Thu, 17 Mar 2016 16:25:38 +0000 (09:25 -0700)
ensure_packages.rb: Modifed to pass hiera parameters (as hash,array) as first argument

1  2 
README.markdown

diff --cc README.markdown
index c9bbdad728647992b4fe62bd3d5a387ac47cdfdf,b6ead96902f3c3bae7d7173ad37ebb9bdbc7597b..e346f4f3502b046654169e8403c91ff63b2d4e23
@@@ -344,14 -344,17 +344,22 @@@ Converts the case of a string or of al
  
  Returns true if the argument is an array or hash that contains no elements, or an empty string. Returns false when the argument is a numerical value. *Type*: rvalue.
  
 +#### `enclose_ipv6`
 +
 +Takes an array of ip addresses and encloses the ipv6 addresses with square
 +brackets. *Type*: rvalue.
 +
  #### `ensure_packages`
  
- Takes a list of packages and only installs them if they don't already exist. It optionally takes a hash as a second parameter to be passed as the third argument to the `ensure_resource()` function. *Type*: statement.
+ Takes a list of packages array/hash and only installs them if they don't already exist. It optionally takes a hash as a second parameter to be passed as the third argument to the `ensure_resource()` or `ensure_resources()` function. *Type*: statement.
+ For Array:
+     ensure_packages(['ksh','openssl'], {'ensure' => 'present'})
+ For Hash:
+     ensure_packages({'ksh' => { enure => '20120801-1' } ,  'mypackage' => { source => '/tmp/myrpm-1.0.0.x86_64.rpm', provider => "rpm" }}, {'ensure' => 'present'})
  
  #### `ensure_resource`