Chef and postgres; how do I specify the password?

随声附和 提交于 2019-12-03 08:37:21

Since you are using Vagrant you should propably add something like the following to your Vagrantfile into the config.vm.provision :chef_solo do |chef| section (where one or more chef.add_recipe calls exists too):

config.vm.provision :chef_solo do |chef|
  # other stuff... like: chef.add_recipe "postgresql::server"
  chef.json = {
    "postgresql" => {
      "password" => {
        "postgres" => "iloverandompasswordsbutthiswilldo"
      }
    }
  }
end

The chef.json hash is the place where all your node specific attributes go and which is handed over to chef-solo during the provision run by Vagrant, see Vagrant doc for more information.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!