diff options
author | Stefan K. Berg <stefan.k.berg@ericsson.com> | 2015-09-10 14:46:28 +0200 |
---|---|---|
committer | Stefan K. Berg <stefan.k.berg@ericsson.com> | 2015-09-10 14:46:28 +0200 |
commit | 5d4a36b80fcd0b69e35e4d4f59cfb64a62453c28 (patch) | |
tree | 623d5b318601c7105896d083c1f0fe2120ec05fa /fuel/build/f_resolvconf/puppet | |
parent | c92ee8677af0dba1b9f28bc9a97cbf141d60e219 (diff) |
Refactoring build system to support Fuel 6.1
As Fuel 6.1 has changed both Debian package handling (fetching
repositories from Internet) as well as Puppet packaging, the support
for patching these has been disabled.
The pre-deploy logic of Fuel has been removed together with a
number of patches applied on top of a Fuel build, among them
fixes for NTP, DNS and /etc/hosts injection.
Instead, when changed default behavior is required, this will be
introduced as Fuel plugins which more cleanly integrates into the
Fuel system, and also decouples additional functionality from the
ISO build stage.
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
Diffstat (limited to 'fuel/build/f_resolvconf/puppet')
-rw-r--r-- | fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp | 73 | ||||
-rw-r--r-- | fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb | 15 |
2 files changed, 0 insertions, 88 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 deleted file mode 100644 index 44f36a2..0000000 --- a/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp +++ /dev/null @@ -1,73 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Class: opnfv::resolver -# -# Add resolver content passed through astute.yaml into resolv.conf -# depending on the role -# -# Suitable yaml content: -# <begin> -# opnfv: -# dns: -# compute: -# - 100.100.100.2 -# - 100.100.100.3 -# controller: -# - 100.100.100.102 -# - 100.100.100.104 -# <end> -# -# -# - -class opnfv::resolver() -{ - if $::fuel_settings['role'] { - if $::fuel_settings['role'] == 'primary-controller' { - $role = 'controller' - } else { - $role = $::fuel_settings['role'] - } - - if ($::fuel_settings['opnfv'] - and $::fuel_settings['opnfv']['dns'] - and $::fuel_settings['opnfv']['dns'][$role]) { - $nameservers=$::fuel_settings['opnfv']['dns'][$role] - - file { '/etc/resolv.conf': - owner => root, - group => root, - 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. - - 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', - } - } - } - } - } -} diff --git a/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb b/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb deleted file mode 100644 index 7a29dca..0000000 --- a/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN -# Modified by OPNFV. -<% @nameservers.each do |ns| %>nameserver <%= ns %> -<% end -%> |