diff options
Diffstat (limited to 'fuel/build/f_resolvconf/puppet/modules')
-rw-r--r-- | fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp b/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp index be4e67d..44f36a2 100644 --- a/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp +++ b/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp @@ -48,16 +48,26 @@ class opnfv::resolver() mode => '0644', content => template('opnfv/resolv.conf.erb'), } -# /etc/resolv.conf is re-generated at each boot by resolvconf, so we -# need to store there as well. - file { '/etc/resolvconf/resolv.conf.d/head': + + # /etc/resolv.conf is re-generated at each boot by resolvconf, so we + # need to store there as well. + + case $::operatingsystem { + 'ubuntu': { + file { '/etc/resolvconf/resolv.conf.d/head': owner => root, group => root, mode => '0644', content => template('opnfv/resolv.conf.erb'), + } + } + 'centos': { + exec { 'for file in ifcfg-eth*; do grep -q -F "PEERDNS=" $file || echo "PEERDNS=no" >> $file; done ': + provider => 'shell', + cwd => '/etc/sysconfig/network-scripts', + } + } } } } } - - |