lib/beaker-puppet/helpers/puppet_helpers.rb in beaker-puppet-1.21.0 vs lib/beaker-puppet/helpers/puppet_helpers.rb in beaker-puppet-1.22.0

- old
+ new

@@ -10,11 +10,11 @@ # for these methods to execute correctly module PuppetHelpers # Return the regular expression pattern for an IPv4 address def ipv4_regex - return /(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/ + Resolv::IPv4::Regex end # Return the IP address that given hostname returns when resolved on # the given host. # @@ -517,10 +517,10 @@ # is our environment variables hash) if opts.has_key?(:environment) puppet_apply_opts['ENV'] = opts[:environment] end - file_path = host.tmpfile('apply_manifest.pp') + file_path = host.tmpfile(%(apply_manifest_#{Time.now.strftime("%H%M%S%L")}.pp)) create_remote_file(host, file_path, manifest + "\n") if host[:default_apply_opts].respond_to? :merge puppet_apply_opts = host[:default_apply_opts].merge( puppet_apply_opts ) end