cookbook 'kdb', '= 0.1.1'
kdb (4) Versions 0.1.1 Follow1
This cookbook configures applications with Elektra.
cookbook 'kdb', '= 0.1.1', :supermarket
knife supermarket install kdb
knife supermarket download kdb
kdb_cookbook_library
Provides resources to interact with the key database of the elektra configuration framework (https://www.libelektra.org).
Usage
The kdbset resource allows to create or update and delete keys in the key database. The kdbmount resource mounts and unmounts configuration files.
The default recipe gives an example on how the resources could be used for new recipes.
Requirements
Default Recipe
The default recipe demonstrates how to add a new configuration value to the etc/hosts file. In the first step the file
is mounted into the key database using the system namespace. A new configuration value is added to the file via kdbset in
the second step. The third step removes the configuration file from the key database. If you open the file afterwards you can
find a new entry. Using the :delete action of kdbset could remove the key from the file.
Resources
kdbset
Creates, updates and deletes key from the key database.
Actions
- create
- delete
Attribute Parameters
Parameter | Type | Description |
---|---|---|
key | string | path to the key that stores the value |
value | string | configuration value to be stored under key |
namespace | string | namespace to use when writing cascading keys |
Examples
create new key
kdbset '/hosts/ipv4/showthatitworks' do
namespace 'system'
value '127.0.0.33'
action :create
end
delete existing key
kdbset 'system/hosts/ipv4/showthatitworks' do
action :delete
end
kdbmount
Mounts configuration files into the key database und removes them from the same.
- create
- delete
Attributes Parameters
Parameter | Type | Description |
---|---|---|
mountpoint | string | where in the database the new backend should be mounted |
file | string | path to the file that should be mounted |
plugins | string | list of elektra plugins to be used, each plugin can be <br> configured by a comma separated list of keys=values |
Examples
mount /etc/hosts into the database
kdbmount 'system/hosts' do
file '/etc/hosts'
plugins 'hosts'
action :create
end
unmounts /etc/hosts from the database
kdbmount 'system/hosts' do
action :delete
end
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.1 passed this metric
Contributing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: kdb/metadata.rb:1
FC065: Ensure source_url is set in metadata: kdb/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: kdb/metadata.rb:1
FC115: Custom resource contains a name_property that is required: kdb/resources/kdbmount.rb:3
Run with Foodcritic Version 13.1.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 passed this metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: kdb/metadata.rb:1
FC065: Ensure source_url is set in metadata: kdb/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: kdb/metadata.rb:1
FC115: Custom resource contains a name_property that is required: kdb/resources/kdbmount.rb:3
Run with Foodcritic Version 13.1.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
FC065: Ensure source_url is set in metadata: kdb/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: kdb/metadata.rb:1
FC115: Custom resource contains a name_property that is required: kdb/resources/kdbmount.rb:3
Run with Foodcritic Version 13.1.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number