Age | Commit message (Collapse) | Author |
|
|
|
`file_line` type: During validation, do not require `line` attribute if:
* `ensure` is `absent`,
* `match` is not empty,
* and `match_for_absence` is `true`.
Also update `spec` tests to reflect this.
|
|
Add check if Gem is defined
|
|
|
|
improve suffix function to support the same feature set as prefix
|
|
|
|
ensure_packages.rb: Modifed to pass hiera parameters (as hash,array) as first argument
|
|
On e.g. Ubuntu 12.04 LTS Gem is not there by default so i added a check to not fail in that fact if this is the case.
|
|
(maint) Fixes fqdn_rand_string tests
|
|
Puppet 4.4.0 and later has changed fqdn_rand to use a higher ceiling
(PUP-5646), the tests for fqdn_rand_string needed to be updated to
reflect the new expected output.
|
|
Add enclose_ipv6 function
|
|
New function "ensure_resources()" to support passing hash as parameter OR from hiera backend
This new function is extension of ensure_resource() which will now support to pass multiple values as hash/array OR from hiera backend variables in title argument with additional parameters needed.
It will
process multiple values for a resource type from the passed argument & pass each entry (type, title, params) to ensure_resource() in required format for further processing.
Now user can have duplicate resource check functionality extended to multiple entries with this new function.
Use:
For multiple resources using
hash:
ensure_resources('user', {'dan' => { gid => 'mygroup', uid =>'600' } , 'alex' => { gid => 'mygroup' }}, {'ensure' =>'present'})
From Hiera Backend:
userlist:
dan:
gid: 'mygroup'
uid: '600'
alex:
gid: 'mygroup'
Call:
ensure_resources('user',hiera_hash('userlist'), {'ensure' => 'present'})
ensure_packages()
Modified to also support Hash type argument for packages
This modification will call newly added ensure_resources() for processing Hash as second argument.
The original functionality remains same for Array type arguments.
Use:
hiera:
packagelist:
ksh:
ensure: latest
mlocate: {}
myrpm:
provider: rpm
source: "/tmp/myrpm-1.0.0.x86_64.rpm"
install_options:
--prefix:
/users/home
openssl:
provider: rpm
source: "/tmp/openssl-1.0.1e-42.el7.x86_64.rpm"
Call:
ensure_packages($packagelist)
|
|
Copy a function from puppetlabs/apache, created by Benedikt Bock by
55cc3b4e8f4bc859a1255cb57be2c7923005d822 .
This function enclose IPv6 addresses in square brackets.
It takes an array of ip addresses and encloses the ipv6 addresses with
square brackets.
Co-Authored-By: Benedikt Bock <benedikt_bock@web.de>
|
|
Add is_ipv4_address and is_ipv6_address functions
|
|
Extend Base64() function support
|
|
|
|
Add dig function
|
|
(FM-4046) Update to current msync configs [006831f]
|
|
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
|
|
Deprecates #try_get_value()
|
|
(FM-4049) update to modulesync_configs
|
|
|
|
These are useful when making decisions based on the type of IP
address received.
|
|
Fix reference to validate_bool in function
|
|
The documentation in `validate_ip_address` references `validate_bool`,
but I believe this should read `validate_ip_address` instead, which
makes more sense.
Looks like this was copied from `validate_ipv4_address`, which I fixed
in 7b068781.
|
|
Add test for basename on path with scheme
|
|
|
|
4.11.0 merge back
|
|
Add a function to validate an x509 RSA key pair
|
|
Put the tests using a valid certificate fixture together and put tests
using a valid key fixture together.
|
|
Test a valid certificate and valid key that have had 48 characters
removed from their middle, to simulate a malformed certificate and key.
Suggested by @DavidS in https://github.com/puppetlabs/puppetlabs-stdlib/pull/552
|
|
Add a function to validate an x509 RSA certificate and key pair, as
commonly used for TLS certificates.
The rationale behind this is that we store our TLS certificates and
private keys in Hiera YAML files, and poor indentation or formatting in
the YAML file could cause a valid certificate to be considered invalid.
Will cause the Puppet run to fail if:
- an invalid certificate is detected
- an invalid RSA key is detected
- the certificate does not match the key, i.e. the certificate
has not been signed by the supplied key
The test certificates I've used in the spec tests were generated using
the Go standard library:
$ go run $GOROOT/src/crypto/tls/generate_cert.go -host localhost
Example output:
==> cache-1.router: Error: Not a valid RSA key: Neither PUB key nor PRIV key:: nested asn1 error at /var/govuk/puppet/modules/nginx/manifests/config/ssl.pp:30 on node cache-1.router.dev.gov.uk
|
|
minor tweak to 4.11.0 adding debian 8 to metadata
|
|
|
|
Add clamp function
|
|
4.11.0 prep
|
|
Clamp keeps value within the range.
Employ of soft() makes the whole thing is independant of order.
|
|
|
|
adds new parser called is_absolute_path
|
|
Allow package_provider fact to resolve on PE 3.x
|
|
PE 3.x emits a puppetversion fact in the format "3.x.x (Puppet Enterprise 3.x.x)". This fact causes an error when invoked on PE 3.x: Could not retrieve fact='package_provider', resolution='<anonymous>': Malformed version number string 3.8.1 (Puppet Enterprise 3.8.1
This fix has been tested on PE 3.8.2 and should work for PE 3.3, 3.7, and 3.8.
Original-fix-by: Alex Harden <aharden@gmail.com>
|
|
(FM-3802) make ensure_resource test of packages
|
|
This ensures that the test passes independently of changes to rubygems.
|
|
|
|
* is_absolute_path returns boolean true if the given path
is absolute, returns false otherwise.
* works for windows and unix
|
|
4.10.x mergeback
|
|
edits to README
|
|
|
|
|
|
|