@@ -20,16 +20,16 @@ network_config { 'eth0':
20
20
ensure => 'present',
21
21
family => 'inet',
22
22
method => 'dhcp',
23
- onboot => ' true' ,
24
- hotplug => ' true' ,
23
+ onboot => true,
24
+ hotplug => true,
25
25
options => {'pre-up' => 'sleep 2'},
26
26
}
27
27
28
28
network_config { 'lo':
29
29
ensure => 'present',
30
30
family => 'inet',
31
31
method => 'loopback',
32
- onboot => ' true' ,
32
+ onboot => true,
33
33
}
34
34
35
35
network_config { 'eth1':
@@ -38,7 +38,7 @@ network_config { 'eth1':
38
38
ipaddress => '169.254.0.1',
39
39
method => 'static',
40
40
netmask => '255.255.0.0',
41
- onboot => ' true' ,
41
+ onboot => true,
42
42
}
43
43
```
44
44
@@ -82,26 +82,28 @@ network_route { 'default':
82
82
83
83
Create resources on the fly with the ` puppet resource ` command:
84
84
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
+ ```
105
107
106
108
## Dependencies
107
109
0 commit comments