I am writing a wrapper cookbook for the community
Essentially, what I’m trying to do is override the following attributes:
default[‘postgresql’][‘enable_pgdg_apt’] = false
default[‘postgresql’][‘version’] = “9.1”
However, many of the attributes within the community postgresql cookbook
use string interpolation for the version. Example:
When setting an override attribute in my wrapper cookbook to set the
version of PostgreSQL to “9.3” - the attributes within the PostgreSQL
cookbook that interpolate the version attribute do not receive the
I am able to set the postgresql version attribute to the desired "9.3"
in my .kitchen.yml file and the override works as you would expect/hope it
would. Meaning, all string interpolated attributes in the postgresql
cookbook receive “9.3” as its version.
After going through and overriding all attributes within the PostgreSQL
cookbook that use string interpolation, I ran into one last snag that has
stopped me from completing the cookbook. There are two attributes within
the PostgreSQL cookbook that set the "unix_socket_directory[-ies]"
attribute based on the PostgreSQL version. However, since the logic is
broken up into two separate lines, and the string interpolation doesn’t
pick up the correct version, it will actually add both attributes to the
postgresql.conf template - breaking the service.
I appreciate any input, thanks!