Skip to content

Commit

Permalink
Merge pull request voxpupuli#84 from jordiclariana/master
Browse files Browse the repository at this point in the history
Fix: do not print properies if they are absent.
  • Loading branch information
adrienthebo authored and Jordi Clariana committed Mar 19, 2015
1 parent 3425968 commit 99a79b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet/provider/network_config/interfaces.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ def self.format_file(filename, providers)
[:netmask, 'netmask'],
[:mtu, 'mtu'],
].each do |(property, section)|
stanza << "#{section} #{provider.send property}" if provider.send(property)
stanza << "#{section} #{provider.send property}" if provider.send(property) and provider.send(property) != :absent
end

if provider.options
if provider.options and provider.options != :absent
provider.options.each_pair do |key, val|
if val.is_a? String
stanza << " #{key} #{val}"
Expand Down

0 comments on commit 99a79b0

Please sign in to comment.