chef-solo + postgres。 pg_hba.conf中的错误字符

时间:2014-10-22 12:15:04

标签: linux postgresql ubuntu chef-solo

我的pg_hba.conf看起来像:

local   all             postgres                                ident

local   all             all                                     ident

host    all             all             127.0.0.1/32            md5

host    all             all             ::1/128                 md5

# "local" is for Unix domain socket connections only
^Atrust

我的Vagrantfile:

# db-server
config.vm.define "db" do |db|
  db.vm.hostname = "db"

  db.vm.provider "virtualbox" do |v|
    v.customize [ "modifyvm", :id, "--cpus", "1" ]
    v.customize [ "modifyvm", :id, "--memory", "512" ]
  end

  db.vm.network "private_network", ip: "192.168.10.11"
  db.vm.provision :chef_solo do |chef|
    chef.json = {
      :postfix => {
        :mailname => "vagrant-ubuntu-trusty-64",
        :main_mailer_type => "Internet Site",
      },
      "postgresql" => {
        "version" => "9.4",
        pg_hba: [
          { type: 'local', db: 'all', user: 'all', addr: '', method: 'trust'}
        ]
      },
    }
    chef.cookbooks_path = "cookbooks"
    chef.add_recipe "apt"
    chef.json = { "apt" => { "compiletime" => true } }
    chef.add_recipe "postgresql"
    chef.add_recipe "postfix"
    chef.add_recipe "test_settings"
  end
end

我正在试图摆脱同行身份验证,但我的conf文件看起来很奇怪。 我一直得到这个输出:

==> db: 2014-10-22 11:59:31 GMT LOG:  invalid connection type "<unread-symbol>trust"
==> db: 2014-10-22 11:59:31 GMT CONTEXT:  line 24 of configuration file   "/etc/postgresql/9.4/main/pg_hba.conf"
==> db: 2014-10-22 11:59:31 GMT FATAL:  could not load pg_hba.conf
==> db:    ...fail!

为什么我在配置文件中得到^A ???什么可能导致这种行为?

0 个答案:

没有答案