I’m just starting to learn my way around chef by designing recipes and cookbooks to install a distributed application.
One of the first things I need to do is install mariadb on one of my servers. Because many recipes will need the database root password, I’ve put the root password in a data bag. (I think that’s an appropriate choice, no?)
To install the database server, a recipe will have a section similar to:
package 'database-server' do package_name 'mariadb-server' action [:install] end
My question: how can I take the root password out of the databag and supply it to dpkg so that the database server installation succeeds and the root password is the one I gave?
The debconf variable names needed (from
debconf-get-selections) are, I believe,