The following example shows how you might manage network configuration with Puppet. In this example, various network-related resource types are declared in a Puppet manifest.
Example 6 Configuring Network Parameters With PuppetThe following example shows how you might specify multiple network configuration parameters in a Puppet manifest.
# Force link speed negotiation to be at least 1 Gb link_properties { "net0": ensure => present, properties => { en-100fdx-cap => "0" }, } link_properties { "net1": ensure => present, properties => { en-100fdx-cap => "0" }, } link_aggregation { "aggr0" : ensure => present, lower_links => [ 'net0', 'net1' ], mode => "dlmp", } ip_interface { "aggr0" : ensure => present, require => Link_aggregation['aggr0'], } ip_interface { "net0": ensure => absent, before => Link_aggregation['aggr0'], } address_object { "net0": ensure => absent, before => Ip_interface['net0'], } address_object { 'aggr0/v4': require => Ip_interface['aggr0'], ensure => present, address => "${myip}/24", address_type => "static", enable => "true", } }