Chef and postgres; how do I specify the password?

后端 未结 1 617
半阙折子戏
半阙折子戏 2021-02-10 17:54

I\'m new to chef, and I\'m trying to interprete the documentation. I\'ve added the opscode postgresql recipe to my chef-solo environment. postgresql seems to install and launch

相关标签:
1条回答
  • 2021-02-10 18:47

    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.

    0 讨论(0)
提交回复
热议问题