Commit graph

334 commits

Author SHA1 Message Date
Bryan Jen
1fe35c6868 Merge pull request #204 from hunner/fix_false
(MODULES-3145) Cast values to strings before passing to provider
2016-03-17 16:09:47 -07:00
Hunter Haugen
072accdb1e (MODULES-3145) Cast values to strings before passing to provider
Puppet gets confused when false values get passed to the provider
because of
https://github.com/puppetlabs/puppet/blob/4.4.0/lib/puppet/property.rb#L247-L248
so lets just cast them all to strings; ini files are untyped anyway.
2016-03-17 15:39:58 -07:00
Bryan Jen
49c2e6038b Merge pull request #202 from puppetlabs/1.5.x
1.5.x
2016-03-10 16:29:46 -07:00
Bryan Jen
1de47a3ba2 Merge pull request #201 from hunner/remove_init
Remove inifile class, test, and dependency
2016-03-07 13:16:46 -07:00
Hunter Haugen
52bc6f8dfc Remove inifile class, test, and dependency
PR #156 merged a base class called `inifile` that dynamically queried
hiera using explicit `hiera_hash()` functions and required functions
from stdlib.

It is an anti-pattern for component classes to contain hiera
functions (even ones that do not trigger under all circumstances) as
this leads to tight-coupling with hiera data structures. It also
promotes the anti-pattern of declaring resources directly in hiera.

Also, inifile is not going to receive a major version increase for a
while (we hope) and so adding a dependency is not desirable at this
point.

Unfortunately this feedback was missed while reviewing the original PR,
so it has to be reverted.
2016-03-07 11:33:32 -08:00
Hunter Haugen
decebd45d1 Prep 1.5.0 2016-03-03 14:55:36 -08:00
Bryan Jen
d31803cce6 Merge pull request #200 from hunner/fix_test
Fix acceptance test for removed section
2016-03-01 17:24:57 -07:00
Hunter Haugen
f77ab45542 Fix acceptance test for removed section
The 199 PR updated ini_setting to remove empty sections after the last
value is removed. This fixes the acceptance test.
2016-03-01 16:23:06 -08:00
Bryan Jen
af9de61afc Merge pull request #199 from hunner/remove_empty_section
Remove empty sections after last setting is removed
2016-03-01 15:48:33 -07:00
Hunter Haugen
2027a0b2ab Remove empty sections after last setting is removed
Empty sections hanging around are not useful, so if the last line in a
section is removed then remove the section. If the section still has
comments, then just leave it be.

This does not add the ability to remove sections that do not have
settings to begin with; only allows cleaning a file as puppet makes
changes to it.
2016-02-29 14:07:21 -08:00
Helen
fbb7050e4b Merge pull request #198 from DavidS/debian-8-support
Update metadata to note Debian 8 support
2016-02-17 12:15:19 +00:00
David Schmitt
ba8ca0ddf2 Update metadata to note Debian 8 support 2016-02-17 11:56:55 +00:00
TP Honey
8cb51cd856 Merge pull request #197 from DavidS/fm-4046-update-msync
(FM-4046) Update to current msync configs [006831f]
2016-02-16 17:02:00 +00:00
David Schmitt
57bb3fe438 (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.
2016-02-16 16:33:31 +00:00
Bryan Jen
b79dd27ac5 Merge pull request #196 from domcleal/pup-4709-workaround-master
Remove brackets from ini_setting titles to workaround PUP-4709
2016-02-09 16:45:31 -07:00
Dominic Cleal
b425fe5a49 Remove brackets from ini_setting titles to workaround PUP-4709
Puppet 4.0 and 4.1 are affected by PUP-4709 which raises duplicate
resource errors when using create_ini_settings(), due to the inclusion
of square brackets in the resource titles.

    Error while evaluating a Function Call, Duplicate
    declaration: Ini_setting[[foo] bar] is already declared; cannot
    redeclare

Removing these from the function allows it to work on these Puppet
versions without error.
2016-02-09 08:06:57 +00:00
TP Honey
1635b84377 Merge pull request #152 from stepanstipl/feature-keep_secret2
Added keep_secret parameter feature
2016-02-02 14:12:17 +00:00
Hunter Haugen
f7eabdeaf2 Merge pull request #194 from DavidS/fm-4049-update-msync
(FM-4049) update to modulesync_configs
2016-01-27 08:36:41 -08:00
David Schmitt
2c76f60cf2 (FM-4049) Update to current msync configs [2c99161] 2016-01-27 14:34:40 +00:00
Stepan Stipl
4b8336ad23 Convert boolean to :true & :false PR #152 2016-01-15 20:47:07 +00:00
Stepan Stipl
af4b3f287a Acceptance tests for show_diff 2016-01-15 20:47:07 +00:00
Stepan Stipl
4853927093 Implemented show_diff parameter, with similar behaviour as show_diff on
type file

show_diff => true (default) prints diff to logs
show_diff => md5 prints only md5 hashes instead of actual values
show_diff => false redacts any information about values

Global show_diff config takes priotiry over this one.
2016-01-15 20:47:07 +00:00
Bryan Jen
35b5dfc04c Merge pull request #156 from ghoneycutt/cr-patch
create resources
2016-01-06 11:28:22 -07:00
Garrett Honeycutt
d83f3011f9 Add ability to specify a hash of ini_settings and ini_subsettings.
This added functionality allows you to specify hashes for ini_setting
and ini_subsetting so that they might be stored in Hiera. Without this
patch, you need to use ini_setting and ini_subsetting resources strictly
in code whereas with this patch, you could describe this in Hiera.
2016-01-06 12:27:21 -05:00
David Schmitt
d662163171 Merge pull request #193 from puppetlabs/1.4.x
1.4.x Mergeback
2015-12-08 15:35:02 +00:00
Helen
3863d9a9c1 Merge pull request #192 from tphoney/1.4.3_release_prep
1.4.3 release prep
2015-11-25 11:47:20 +00:00
tphoney
5eb4c7a3d5 1.4.3 release prep 2015-11-24 15:25:12 +00:00
Helen
27857c28fc Merge pull request #191 from tphoney/remove_allow_failure_travis
remove allowing failures for 4.0
2015-11-17 13:29:38 +00:00
tphoney
fd40618ecf remove allowing failures for 4.0 2015-11-17 13:24:24 +00:00
Morgan Haskel
960d85a670 Merge pull request #190 from puppetlabs/1.4.x
1.4.x mergeback to master
2015-09-01 16:58:25 -07:00
Morgan Haskel
2c8a08e675 Merge pull request #189 from bmjen/fix-metadata
updates metadata.json to match Puppet 4.x PMT output
2015-09-01 16:55:23 -07:00
Bryan Jen
f29cdb8b13 updates metadata.json to match Puppet 4.x PMT output 2015-09-01 16:54:15 -07:00
TP Honey
43bf3b0b78 Merge pull request #188 from DavidS/fix-readme
(maint) Fix README for ini_setting parameters
2015-08-27 15:11:31 +01:00
Ryan Whitehurst
53606a2ac8 (maint) Fix README for ini_setting parameters
Update descriptions of the `section` parameter and the `setting`
parameter in `ini_setting` to match the descriptions in
`ini_subsetting`. Commit af78845 erroneously updated the README
description for the `setting` parameter with a description intended for
the `section` parameter.
2015-08-27 15:08:43 +01:00
Hunter Haugen
2fbeac25da Merge pull request #185 from danzilio/create_ini_settings_namespace
Adding path to create_ini_settings resources
2015-08-26 11:31:33 -07:00
Bryan Jen
65ee1d69b1 Merge pull request #187 from tphoney/release_prep_1_4_2
Release prep 1 4 2
2015-08-21 09:19:55 -07:00
tphoney
cda3ccaecc 1.4.2 release prep 2015-08-21 14:58:26 +01:00
David Danzilio
54f12d3f8e Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-inifile into create_ini_settings_namespace 2015-08-17 13:47:14 -04:00
Morgan Haskel
7e0527248f Merge pull request #186 from puppetlabs/1.4.x
1.4.x mergeback
2015-08-17 10:18:10 -07:00
David Danzilio
a94f51e68d Adding path to create_ini_settings resources
Currently the create_ini_settings function creates an ini_setting with a
title comprised of the section and setting names. This means that we
run into resource conflicts when defining the same section/setting
combinations but in different files. Since the path parameter is
required, we can safely add this to the title of the ini_setting
resource created by the create_ini_settings function. This commit does
just that.
2015-08-12 18:00:57 -04:00
JT (Jonny)
de45163752 Merge pull request #184 from glarizza/MODULES_2369_key_val_separator
[MODULES-2369] Support a space as a key_val_separator
2015-08-07 15:43:56 +01:00
Gary Larizza
d452e6ca1e Support a space as a key_val_separator
Previously, trying to use a space as a key_val_separator in the ini_setting
type would fail because #strip is being called on the key_val_separator
attribute, which completely kills the space. This commit checks to see
if key_val_separator has been set as a space, and, if so, sets the `k_v_s`
variable in the library to be ' ' instead of ''.  This in turn allows the
provider to check for existing values (instead of inserting the value every
time Puppet is run).
2015-08-06 13:56:16 -07:00
Bryan Jen
f1e4313740 Merge pull request #183 from cyberious/MODULES-1908
(MODULES-1908) Munge the setting to ensure we always strip the whitespace
2015-08-03 10:10:20 -07:00
Travis Fields
48965fb01c (MODULES-1908) Munge the setting to ensure we always strip the whitespace 2015-08-03 09:41:11 -07:00
Hunter Haugen
b499f70710 Merge pull request #182 from mhaskel/MODULES-2212
MODULES-2212 - Add use_exact_match parameter for subsettings
2015-07-31 16:21:22 -07:00
Morgan Haskel
2ab47100c7 MODULES-2212 - Add use_exact_match parameter for subsettings
There's no way to distinguish between a subsetting with a value and a
subsetting with no value, so add a parameter to allow that to be
specified.
2015-07-31 16:11:27 -07:00
Morgan Haskel
9147ecc3e8 Whitespace cleanup
This file was misindented
2015-07-29 13:33:20 -07:00
Jean B.
ab87c73142 Merge pull request #181 from hunner/tweak_readme
Reorder output and remove whitespace
2015-07-28 11:48:47 -07:00
Hunter Haugen
af39974708 Reorder output and remove whitespace 2015-07-27 16:15:02 -07:00
Hunter Haugen
43f0c68631 Merge pull request #180 from jbondpdx/1.4.x
Edits to new Function: `create_ini_settings` in README
2015-07-27 16:13:04 -07:00