From 99a79b06a1cd51b11cd5be6624bf1ce608e08c99 Mon Sep 17 00:00:00 2001 From: Adrien Thebo Date: Wed, 4 Feb 2015 11:24:51 +0100 Subject: [PATCH] Merge pull request #84 from jordiclariana/master Fix: do not print properies if they are absent. --- lib/puppet/provider/network_config/interfaces.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/network_config/interfaces.rb b/lib/puppet/provider/network_config/interfaces.rb index 94fe164d..64da85c3 100644 --- a/lib/puppet/provider/network_config/interfaces.rb +++ b/lib/puppet/provider/network_config/interfaces.rb @@ -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}"