Skip to content

Commit

Permalink
Merge pull request #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 committed Feb 4, 2015
2 parents cd1f6c5 + 16db25d commit e4e4d43
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 @@ -287,10 +287,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 e4e4d43

Please sign in to comment.