Joey Boggs
2009-Apr-09 19:17 UTC
[Ovirt-devel] [PATCH server] move add_guest_server_to_etc_hosts into common dns
If using a remote dns server the installer will fail, since the imported
dns::remote class does not contain add_guest_server_to_etc_hosts, adding it to
common is the quickest fix until the classes are better organized to
common/remote/bundled
---
installer/modules/ovirt/manifests/dns.pp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/installer/modules/ovirt/manifests/dns.pp
b/installer/modules/ovirt/manifests/dns.pp
index 57c128b..7709cbf 100644
--- a/installer/modules/ovirt/manifests/dns.pp
+++ b/installer/modules/ovirt/manifests/dns.pp
@@ -65,17 +65,17 @@ define dns::common($guest_ipaddr="",
$admin_ipaddr="",$guest_dev="",$admin_dev="
require => [Single_exec["set_hostname"],
Package["dnsmasq"], File["/etc/dhclient.conf"]] ,
notify => Service[dnsmasq],
}
+
+ single_exec {"add_guest_server_to_etc_hosts":
+ command => "/bin/echo $guest_ipaddr $ipa_host >>
/etc/hosts",
+ notify => [Service[dnsmasq],
Single_exec["add_dns_server_to_resolv.conf"]]
+ }
}
define dns::bundled($guest_ipaddr="",
$admin_ipaddr="",$guest_dev="",$admin_dev="") {
dns::common{"setup": guest_ipaddr=>$guest_ipaddr,
admin_ipaddr=>$admin_ipaddr, guest_dev=>$guest_dev,
admin_dev=>$admin_dev}
- single_exec {"add_guest_server_to_etc_hosts":
- command => "/bin/echo $guest_ipaddr $ipa_host >>
/etc/hosts",
- notify => [Service[dnsmasq],
Single_exec["add_dns_server_to_resolv.conf"]]
- }
-
augeas{"set_system_hostname":
context => "/files/etc/sysconfig/network",
changes => [
--
1.6.0.6
Hugh O. Brock
2009-Apr-13 02:01 UTC
[Ovirt-devel] [PATCH server] move add_guest_server_to_etc_hosts into common dns
On Thu, Apr 09, 2009 at 03:17:05PM -0400, Joey Boggs wrote:> If using a remote dns server the installer will fail, since the imported dns::remote class does not contain add_guest_server_to_etc_hosts, adding it to common is the quickest fix until the classes are better organized to common/remote/bundled > > --- > installer/modules/ovirt/manifests/dns.pp | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/installer/modules/ovirt/manifests/dns.pp b/installer/modules/ovirt/manifests/dns.pp > index 57c128b..7709cbf 100644 > --- a/installer/modules/ovirt/manifests/dns.pp > +++ b/installer/modules/ovirt/manifests/dns.pp > @@ -65,17 +65,17 @@ define dns::common($guest_ipaddr="", $admin_ipaddr="",$guest_dev="",$admin_dev=" > require => [Single_exec["set_hostname"], Package["dnsmasq"], File["/etc/dhclient.conf"]] , > notify => Service[dnsmasq], > } > + > + single_exec {"add_guest_server_to_etc_hosts": > + command => "/bin/echo $guest_ipaddr $ipa_host >> /etc/hosts", > + notify => [Service[dnsmasq], Single_exec["add_dns_server_to_resolv.conf"]] > + } > } > > define dns::bundled($guest_ipaddr="", $admin_ipaddr="",$guest_dev="",$admin_dev="") { > > dns::common{"setup": guest_ipaddr=>$guest_ipaddr, admin_ipaddr=>$admin_ipaddr, guest_dev=>$guest_dev, admin_dev=>$admin_dev} > > - single_exec {"add_guest_server_to_etc_hosts": > - command => "/bin/echo $guest_ipaddr $ipa_host >> /etc/hosts", > - notify => [Service[dnsmasq], Single_exec["add_dns_server_to_resolv.conf"]] > - } > - > augeas{"set_system_hostname": > context => "/files/etc/sysconfig/network", > changes => [This was tested by Mike McGrath and works, so ACK --Hugh