Adds way to configure what sections of secret databag are called
* Also adds two convenience routines for db_password and service_password
This commit is contained in:
@@ -28,6 +28,8 @@ This cookbook exposes a set of default library routines:
|
||||
* `db_uri` -- Returns the SQLAlchemy RFC-1738 DB URI (see: http://rfc.net/rfc1738.html) for a named OpenStack database
|
||||
* `db_create_with_user` -- Creates a database and database user for a named OpenStack database
|
||||
* `secret` -- Returns the value of an encrypted data bag for a named OpenStack secret key and key-section
|
||||
* `db_password` -- Ease-of-use helper that returns the decrypted database password for a named OpenStack database
|
||||
* `service_password` -- Ease-of-use helper that returns the decrypted service password for named OpenStack service
|
||||
|
||||
Usage
|
||||
-----
|
||||
@@ -56,10 +58,10 @@ require "uri"
|
||||
puts ::URI.decode nova_api_ap.to_s
|
||||
```
|
||||
|
||||
Example of using the `secret` and `db\_uri` routine:
|
||||
Example of using the `db_password` and `db_uri` routine:
|
||||
|
||||
```ruby
|
||||
db_pass = secret "passwords", "cinder"
|
||||
db_pass = db_password "cinder"
|
||||
db_user = node["cinder"]["db"]["user"]
|
||||
sql_connection = db_uri "volume", db_user, db_pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user