Skip to content

auto line is removed with reimplement_debian_parsing #22

Closed
@robertstarmer

Description

@robertstarmer

In deploying a full replacement of the interfaces file with 3 interfaces defined, I either loose the eth1 "auto" inclusion, or loose all my interfaces in the auto line post puppet run.

(private_interface is eth0, external_interface is eth1)

network_config { "$::private_interface":
ensure => 'present',
hotplug => false,
family => 'inet',
ipaddress => "$::controller_node_address",
method => 'static',
netmask => "$::controller_node_netmask",
options => {
"dns-search" => "$::domain_name",
"dns-nameservers" => "$::cobbler_node_ip",
"gateway" => "$::node_gateway"
},
onboot => 'true',
notify => Service['networking'],
}

network_config { 'lo':
ensure => 'present',
hotplug => false,
family => 'inet',
method => 'loopback',
onboot => 'true',
notify => Service['networking'],
}

network_config { "$::external_interface":
ensure => 'present',
hotplug => false,
family => 'inet',
method => 'static',
ipaddress => '0.0.0.0',
netmask => '255.255.255.255',
onboot => 'true',
notify => Service['networking'],
}

service {'networking':
ensure => 'running',
restart => 'true',
}

produces something like:

root@compute1:~# cat /etc/network/interfaces

HEADER: This file is is being managed by puppet. Changes to

HEADER: interfaces that are not being managed by puppet will persist;

HEADER: however changes to interfaces that are being managed by puppet will

HEADER: be overwritten. In addition, file order is NOT guaranteed.

HEADER: Last generated at: Thu Jan 10 05:53:41 +0000 2013

The following interfaces will be started on boot

auto

The following interfaces are hotpluggable

allow-hotplug

iface eth0 inet static
netmask 255.255.255.0
address 192.168.25.10
dns-nameservers 192.168.25.254
dns-search dmz25.lab
gateway 192.168.25.1

iface eth1 inet static
netmask 255.255.255.255
address 0.0.0.0
down ifconfig eth1 down
up ifconfig eth1 up

iface lo inet loopback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions