ipaddr is a list, cannot compare it with a string

Closes-Bug: #1543767
Change-Id: I58ce33af7fbabe42f57c2ef802d9446a144f802e
This commit is contained in:
Georgy Kibardin 2016-03-24 10:07:35 +03:00
parent c540ead82d
commit c493a82214
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ Puppet::Type.type(:l3_ifconfig).provide(:lnx, :parent => Puppet::Provider::L3_ba
if ! @property_flush.empty?
debug("FLUSH properties: #{@property_flush}")
# FLUSH changed properties
is_dhcp = @property_flush[:ipaddr].to_s.downcase == 'dhcp'
is_dhcp = (Array(@property_flush[:ipaddr]) & [:dhcp, 'dhcp', 'DHCP']).any?
if ! @property_flush[:ipaddr].nil?
if @property_flush[:ipaddr].include?(:absent)
# flush all ip addresses from interface