postgresql_lwrp
postgresql_lwrp copied to clipboard
Custom resource
i use zabbix_lwrp him depends postgresql cookbook but i want use postgresql-lwrp BUT! When i use postgresql_user or postgresql_database Custom resource chef use it from postgresql and i see error
[2019-09-10T17:58:48+03:00] ERROR: undefined method in_version' for Custom resource postgresql_user from cookbook postgresql
What i need to do for use Custom resource from postgresql-lwrp in my recipe ??? Help...
@masikmos Hello!
Thank you for your question and for pointing out to the problem. I'm investigating the situation but I do not have an elegant solution for you right now.
zabbix_lwrp
uses postgresql
cookbook at least because it supports more platforms so it is unwise to open an issue or PR to migrate to postgresql_lwrp
.
I see two ways to address your situation:
- fork
zabbix_lwrp
and removepostgresql.rb
recipe withdepends "postgresql"
- try this: https://stackoverflow.com/questions/51271247/when-two-different-resources-from-two-cookbooks-have-the-same-name-how-can-i-sp
nope... link dont work...
i do that
Chef.resource_priority_map.priority(:postgresql_user, [postgresql_lwrp::user]) Chef.resource_priority_map.priority(:postgresql_database, [postgresql_lwrp::database])
and got
[2019-09-12T00:29:53+03:00] ERROR: undefined local variable or method postgresql_lwrp' for cookbook: default, recipe: postgresql11_dbuser :Chef::Recipe
any words after ... [postgresql_lwrp:: do nothing, all time undefined local variable or method `postgresql_lwrp'...
fix 1 should be worked, but i want resource priority )))
Any more ideas? ) Maybe i do something wrong?