summaryrefslogtreecommitdiffstats
path: root/fuel/build/f_resolvconf/puppet
diff options
context:
space:
mode:
authorStefan K. Berg <stefan.k.berg@ericsson.com>2015-09-10 14:46:28 +0200
committerStefan K. Berg <stefan.k.berg@ericsson.com>2015-09-14 13:53:11 +0200
commit07f4e6531023cbf742e7d187c6a0ee0800b64e01 (patch)
treea03c4311c4b9ac58d4105b5c3ac4741901146e8a /fuel/build/f_resolvconf/puppet
parent2c06022aa12ec8fc0ac3e50de36b900c92bf9817 (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.pp73
-rw-r--r--fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb15
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 -%>