@@ -20,16 +20,16 @@ network_config { 'eth0':
2020 ensure => 'present',
2121 family => 'inet',
2222 method => 'dhcp',
23- onboot => ' true' ,
24- hotplug => ' true' ,
23+ onboot => true,
24+ hotplug => true,
2525 options => {'pre-up' => 'sleep 2'},
2626}
2727
2828network_config { 'lo':
2929 ensure => 'present',
3030 family => 'inet',
3131 method => 'loopback',
32- onboot => ' true' ,
32+ onboot => true,
3333}
3434
3535network_config { 'eth1':
@@ -38,7 +38,7 @@ network_config { 'eth1':
3838 ipaddress => '169.254.0.1',
3939 method => 'static',
4040 netmask => '255.255.0.0',
41- onboot => ' true' ,
41+ onboot => true,
4242}
4343```
4444
@@ -82,26 +82,28 @@ network_route { 'default':
8282
8383Create resources on the fly with the ` puppet resource ` command:
8484
85- root@debian-6:~# puppet resource network_config eth1 ensure=present family=inet method=static ipaddress=169.254.0.1 netmask=255.255.0.0
86- notice: /Network_config[eth1]/ensure: created
87- network_config { 'eth1':
88- ensure => 'present',
89- family => 'inet',
90- ipaddress => '169.254.0.1',
91- method => 'static',
92- netmask => '255.255.0.0',
93- onboot => 'true',
94- }
95-
96- # puppet resource network_route 23.23.42.0 ensure=present netmask=255.255.255.0 interface=eth0 gateway=192.168.1.1
97- notice: /Network_route[23.23.42.0]/ensure: created
98- network_route { '23.23.42.0':
99- ensure => 'present',
100- gateway => '192.168.1.1',
101- interface => 'eth0',
102- netmask => '255.255.255.0',
103- options => 'table 200',
104- }
85+ ```
86+ root@debian-6:~# puppet resource network_config eth1 ensure=present family=inet method=static ipaddress=169.254.0.1 netmask=255.255.0.0
87+ notice: /Network_config[eth1]/ensure: created
88+ network_config { 'eth1':
89+ ensure => 'present',
90+ family => 'inet',
91+ ipaddress => '169.254.0.1',
92+ method => 'static',
93+ netmask => '255.255.0.0',
94+ onboot => true,
95+ }
96+
97+ # puppet resource network_route 23.23.42.0 ensure=present netmask=255.255.255.0 interface=eth0 gateway=192.168.1.1
98+ notice: /Network_route[23.23.42.0]/ensure: created
99+ network_route { '23.23.42.0':
100+ ensure => 'present',
101+ gateway => '192.168.1.1',
102+ interface => 'eth0',
103+ netmask => '255.255.255.0',
104+ options => 'table 200',
105+ }
106+ ```
105107
106108## Dependencies
107109
0 commit comments