我使用文件实现了这项工作。
file { '/home/vagrant/.gitconfig': content => "[color]\n ui = auto", owner => 'vagrant', group => 'vagrant', require => Package['git'], }
但亚历克斯上面给出的答案可能是正确的。现在就试试看:)