GitBucket
Toggle navigation
Pull requests
Issues
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Fork
: 0
x-way
/
puppet-interfaces
Browse code
Cleanup inline_template usage
master
1 parent
a28e50b
commit
03ba889c4b9a0dac4c6ba3c1a557f9fb96ab5a9d
Andreas Jaggi
authored
on 13 Aug 2012
Patch
Unified
Split
Showing
2 changed files
+1
-2
■
■
■
■■
manifests/iface.pp
+1
-2
■
■
■
■■
manifests/mapping.pp
Ignore Space
Show notes
View
3
■
■
■
■■
manifests/iface.pp
if
$auto
==
1
{
interfaces
::
auto
{
$ifname_real
:
}
}
$str
=
"iface ${ifname_real} ${family} ${method}\n\t<%= options.join('\n\t') %>\n\n"
concat
::
fragment
{
"interfaces::iface_${name}"
:
target
=>
'/etc/network/interfaces'
,
content
=>
inline_template
(
$str
),
content
=>
inline_template
(
"iface <%= ifname_real -%> <%= family -%> <%= method -%>\n\t<%= options.join('\n\t') -%>\n\n"
),
}
}
Ignore Space
Show notes
View
3
■
■
■
■■
manifests/mapping.pp
define interfaces
::
mapping
(
$script
,
$maps
)
{
$str
=
"mapping ${name}\n\tscript ${script}\n\t<%= maps.join('\n\t') %>\n\n"
concat
::
fragment
{
"interfaces::mapping_${name}"
:
target
=>
'/etc/network/interfaces'
,
content
=>
inline_template
(
$str
),
content
=>
inline_template
(
"mapping <%= name -%>\n\tscript <%= script -%>\n\t<%= maps.join('\n\t') -%>\n\n"
),
}
}
Show line notes below