Age | Commit message (Collapse) | Author |
|
|
|
|
|
Get path to configuration file from config hash to avoid undefined
variable error.
|
|
* refactoring code for simplicity and easier maintenance.
* prefix the format and options config with default_ to better
represent their intention.
|
|
Only reacts to key namespace trocla::password::<trocla_key>. Looks up
additional parameters via hiera itself as
trocla::options::<trocla_key>::format (string) and
trocla::options::<trocla_key>::options (hash). Looks for <trocla_key> in
trocla as hiera/<source>/<trocla> with <source> iterating over the
configured hiera hierarchy. If not found, creates and returns a new
password with trocla key <trocla_key>.
example entry in hiera.yaml:
backends:
- ...
- trocla
trocla:
- configfile: /etc/puppet/troclarc.yaml
- format: plain
- options:
length: 16
example usage in hiera yaml file:
kerberos::kdc_database_password: "%{hiera('trocla::password::kdc_database_password')}"
trocla::options::kdc_database_password::format: 'plain'
trocla::options::kdc_database_password::options:
length: '71'
|
|
Up to now we raised an error if nothing was found while using
trocla_get. The main idea was to ensure that typos in the key/format
are easily spotted and not overlooked as no password being returned
usually indicates that something is wrong.
As outlined in #14 there are use cases where it makes sense to not
have this behavior.
This change allows us to suppress the error raising and just return
the puppet undef if nothing is found.
|
|
|
|
This makes the Gem usable in the latest Puppet versions.
The handling of RubyGems got revised in Puppet 3.0.1-rc1:
http://projects.puppetlabs.com/issues/16757
The new policy is that either bundler and/or rubygems are guaranteed to
be loaded and initialized when the Puppet manifest is evaluated, making
it unnecessary for Puppet modules to load rubygems.
This new policy broke the puppet-trocla module. This is because
'Puppet.features.rubygems?' always evaluates to false now, which causes
the module to abort the manifest compilation with a message informing
about the necessity of RubyGems to be present.
|
|
|
|
pass a yaml string
|
|
|
|
|
|
|
|
|
|
|