chef 17.6.18-universal-mingw32 → 17.9.18-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -0
- data/chef.gemspec +1 -0
- data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/concrt140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +180 -180
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
- data/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
- data/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
- data/distro/ruby_bin_folder/x86/concrt140.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_1.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_2.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +0 -0
- data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
- data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
- data/distro/ruby_bin_folder/x86/vccorlib140.dll +0 -0
- data/distro/ruby_bin_folder/x86/vcruntime140.dll +0 -0
- data/lib/chef/application/base.rb +1 -1
- data/lib/chef/chef_fs/file_pattern.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +1 -1
- data/lib/chef/compliance/default_attributes.rb +12 -2
- data/lib/chef/compliance/runner.rb +51 -5
- data/lib/chef/data_collector/run_end_message.rb +1 -1
- data/lib/chef/dsl/reboot_pending.rb +1 -1
- data/lib/chef/exceptions.rb +10 -0
- data/lib/chef/mixin/powershell_exec.rb +6 -5
- data/lib/chef/mixin/why_run.rb +8 -2
- data/lib/chef/powershell.rb +8 -6
- data/lib/chef/provider/cron.rb +6 -3
- data/lib/chef/provider/directory.rb +2 -2
- data/lib/chef/provider/git.rb +1 -1
- data/lib/chef/provider/ifconfig/debian.rb +1 -1
- data/lib/chef/provider/ifconfig.rb +4 -4
- data/lib/chef/provider/mount/linux.rb +16 -2
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/package/dnf.rb +1 -1
- data/lib/chef/provider/package/habitat.rb +1 -1
- data/lib/chef/provider/package/powershell.rb +13 -10
- data/lib/chef/provider/package/yum/python_helper.rb +81 -25
- data/lib/chef/provider/package/yum.rb +39 -12
- data/lib/chef/provider/package/zypper.rb +2 -0
- data/lib/chef/provider/package.rb +62 -27
- data/lib/chef/provider/subversion.rb +5 -5
- data/lib/chef/provider.rb +5 -2
- data/lib/chef/providers.rb +0 -1
- data/lib/chef/pwsh.rb +3 -2
- data/lib/chef/resource/apt_package.rb +2 -2
- data/lib/chef/resource/chef_client_config.rb +21 -1
- data/lib/chef/resource/chef_client_launchd.rb +1 -1
- data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -0
- data/lib/chef/resource/chocolatey_config.rb +1 -1
- data/lib/chef/resource/chocolatey_feature.rb +1 -1
- data/lib/chef/resource/chocolatey_package.rb +3 -3
- data/lib/chef/resource/chocolatey_source.rb +24 -2
- data/lib/chef/resource/cron/cron.rb +75 -1
- data/lib/chef/resource/cron/cron_d.rb +2 -1
- data/lib/chef/resource/directory.rb +1 -1
- data/lib/chef/resource/dnf_package.rb +4 -6
- data/lib/chef/resource/dpkg_package.rb +5 -0
- data/lib/chef/resource/execute.rb +1 -4
- data/lib/chef/resource/habitat_install.rb +5 -5
- data/lib/chef/resource/homebrew_tap.rb +0 -4
- data/lib/chef/resource/inspec_waiver.rb +1 -1
- data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
- data/lib/chef/resource/kernel_module.rb +27 -2
- data/lib/chef/resource/launchd.rb +0 -3
- data/lib/chef/resource/macos_userdefaults.rb +41 -131
- data/lib/chef/resource/powershell_package_source.rb +8 -8
- data/lib/chef/resource/rhsm_register.rb +31 -0
- data/lib/chef/resource/support/client.erb +7 -0
- data/lib/chef/resource/windows_auto_run.rb +1 -1
- data/lib/chef/resource/windows_dfs_namespace.rb +2 -2
- data/lib/chef/resource/windows_feature_powershell.rb +8 -9
- data/lib/chef/resource/windows_task.rb +25 -10
- data/lib/chef/resource/windows_update_settings.rb +3 -3
- data/lib/chef/resource.rb +2 -2
- data/lib/chef/resource_reporter.rb +1 -1
- data/lib/chef/secret_fetcher/azure_key_vault.rb +64 -8
- data/lib/chef/secret_fetcher/hashi_vault.rb +37 -3
- data/lib/chef/secret_fetcher.rb +0 -1
- data/lib/chef/version.rb +1 -1
- data/spec/functional/dsl/reboot_pending_spec.rb +3 -3
- data/spec/functional/dsl/registry_helper_spec.rb +1 -1
- data/spec/functional/resource/dnf_package_spec.rb +138 -124
- data/spec/functional/resource/dpkg_package_spec.rb +16 -0
- data/spec/functional/resource/dsc_script_spec.rb +2 -2
- data/spec/functional/resource/macos_userdefaults_spec.rb +139 -0
- data/spec/functional/resource/registry_spec.rb +81 -81
- data/spec/functional/resource/yum_package_spec.rb +789 -129
- data/spec/functional/resource/zypper_package_spec.rb +7 -0
- data/spec/functional/win32/registry_spec.rb +8 -8
- data/spec/integration/client/client_spec.rb +31 -0
- data/spec/unit/application/base_spec.rb +40 -0
- data/spec/unit/compliance/runner_spec.rb +62 -1
- data/spec/unit/data_collector_spec.rb +24 -1
- data/spec/unit/dsl/reboot_pending_spec.rb +1 -1
- data/spec/unit/file_access_control_spec.rb +1 -1
- data/spec/unit/mixin/default_paths_spec.rb +1 -1
- data/spec/unit/mixin/securable_spec.rb +3 -3
- data/spec/unit/mixin/why_run_spec.rb +53 -0
- data/spec/unit/provider/cron_spec.rb +45 -0
- data/spec/unit/provider/group/groupadd_spec.rb +1 -0
- data/spec/unit/provider/group/usermod_spec.rb +2 -2
- data/spec/unit/provider/ifconfig_spec.rb +2 -0
- data/spec/unit/provider/mount/linux_spec.rb +16 -3
- data/spec/unit/provider/package/bff_spec.rb +1 -0
- data/spec/unit/provider/package/powershell_spec.rb +114 -114
- data/spec/unit/provider/package/rubygems_spec.rb +8 -5
- data/spec/unit/provider/package/solaris_spec.rb +1 -0
- data/spec/unit/provider/package/windows_spec.rb +1 -1
- data/spec/unit/provider/registry_key_spec.rb +4 -4
- data/spec/unit/provider/service/arch_service_spec.rb +2 -2
- data/spec/unit/provider/service/debian_service_spec.rb +1 -0
- data/spec/unit/provider/service/gentoo_service_spec.rb +1 -0
- data/spec/unit/provider/service/macosx_spec.rb +1 -0
- data/spec/unit/provider/service/redhat_spec.rb +4 -1
- data/spec/unit/provider/service/simple_service_spec.rb +6 -4
- data/spec/unit/provider/service/windows_spec.rb +5 -5
- data/spec/unit/provider/subversion_spec.rb +4 -4
- data/spec/unit/provider/user_spec.rb +2 -0
- data/spec/unit/provider/windows_env_spec.rb +1 -1
- data/spec/unit/provider/zypper_repository_spec.rb +1 -1
- data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +14 -0
- data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
- data/spec/unit/resource/chocolatey_feature_spec.rb +1 -1
- data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
- data/spec/unit/resource/dpkg_package_spec.rb +12 -0
- data/spec/unit/resource/kernel_module_spec.rb +2 -1
- data/spec/unit/resource/macos_user_defaults_spec.rb +36 -96
- data/spec/unit/resource/registry_key_spec.rb +10 -10
- data/spec/unit/resource/rhsm_register_spec.rb +42 -0
- data/spec/unit/resource/windows_auto_run_spec.rb +1 -1
- data/spec/unit/resource/windows_feature_powershell_spec.rb +1 -1
- data/spec/unit/resource/windows_firewall_rule_spec.rb +2 -2
- data/spec/unit/resource/windows_task_spec.rb +3 -3
- data/spec/unit/resource_reporter_spec.rb +2 -2
- data/spec/unit/resource_spec.rb +5 -0
- data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +99 -20
- data/spec/unit/secret_fetcher/hashi_vault_spec.rb +46 -0
- data/spec/unit/util/backup_spec.rb +1 -1
- data/spec/unit/win32/registry_spec.rb +3 -3
- metadata +25 -10
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.20.51904.dll +0 -0
- data/lib/chef/provider/group/suse.rb +0 -82
- data/spec/unit/provider/group/suse_spec.rb +0 -90
@@ -71,7 +71,7 @@ class Chef
|
|
71
71
|
|
72
72
|
logger.debug("#{self.class}##{__method__}: enabling Compliance Phase")
|
73
73
|
|
74
|
-
|
74
|
+
report_with_interval
|
75
75
|
end
|
76
76
|
|
77
77
|
def run_failed(_exception, _run_status)
|
@@ -82,7 +82,7 @@ class Chef
|
|
82
82
|
|
83
83
|
logger.debug("#{self.class}##{__method__}: enabling Compliance Phase")
|
84
84
|
|
85
|
-
|
85
|
+
report_with_interval
|
86
86
|
end
|
87
87
|
|
88
88
|
### Below code adapted from audit cookbook's files/default/handler/audit_report.rb
|
@@ -92,7 +92,6 @@ class Chef
|
|
92
92
|
fail_if_not_present
|
93
93
|
inspec_gem_source
|
94
94
|
inspec_version
|
95
|
-
interval
|
96
95
|
owner
|
97
96
|
raise_if_unreachable
|
98
97
|
}.freeze
|
@@ -106,6 +105,15 @@ class Chef
|
|
106
105
|
end
|
107
106
|
end
|
108
107
|
|
108
|
+
def report_with_interval
|
109
|
+
if interval_seconds_left <= 0
|
110
|
+
create_timestamp_file if interval_enabled
|
111
|
+
report
|
112
|
+
else
|
113
|
+
logger.info "Skipping Chef Infra Compliance Phase due to interval settings (next run in #{interval_seconds_left / 60.0} mins)"
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
109
117
|
def report(report = nil)
|
110
118
|
logger.info "Starting Chef Infra Compliance Phase"
|
111
119
|
report ||= generate_report
|
@@ -118,7 +126,7 @@ class Chef
|
|
118
126
|
return
|
119
127
|
end
|
120
128
|
|
121
|
-
|
129
|
+
requested_reporters.each do |reporter_type|
|
122
130
|
logger.info "Reporting to #{reporter_type}"
|
123
131
|
@reporters[reporter_type].send_report(report)
|
124
132
|
end
|
@@ -325,7 +333,7 @@ class Chef
|
|
325
333
|
@reporters = {}
|
326
334
|
# Note that the docs don't say you can use an array, but our implementation
|
327
335
|
# supports it.
|
328
|
-
|
336
|
+
requested_reporters.each do |type|
|
329
337
|
unless SUPPORTED_REPORTERS.include? type
|
330
338
|
raise "CMPL003: '#{type}' found in node['audit']['reporter'] is not a supported reporter for Compliance Phase. Supported reporters are: #{SUPPORTED_REPORTERS.join(", ")}. For more information, see the documentation at https://docs.chef.io/chef_compliance_phase#reporters"
|
331
339
|
end
|
@@ -358,6 +366,44 @@ class Chef
|
|
358
366
|
def safe_input_collection
|
359
367
|
run_context&.input_collection
|
360
368
|
end
|
369
|
+
|
370
|
+
def requested_reporters
|
371
|
+
(Array(node["audit"]["reporter"]) + ["cli"]).uniq
|
372
|
+
end
|
373
|
+
|
374
|
+
def create_timestamp_file
|
375
|
+
FileUtils.touch report_timing_file
|
376
|
+
end
|
377
|
+
|
378
|
+
def report_timing_file
|
379
|
+
::File.join(Chef::FileCache.create_cache_path("compliance"), "report_timing.json")
|
380
|
+
end
|
381
|
+
|
382
|
+
def interval_time
|
383
|
+
@interval_time ||= node.read("audit", "interval", "time")
|
384
|
+
end
|
385
|
+
|
386
|
+
def interval_enabled
|
387
|
+
@interval_enabled ||= node.read("audit", "interval", "enabled")
|
388
|
+
end
|
389
|
+
|
390
|
+
def interval_seconds
|
391
|
+
@interval_seconds ||=
|
392
|
+
if interval_enabled
|
393
|
+
logger.debug "Running Chef Infra Compliance Phase every #{interval_time} minutes"
|
394
|
+
interval_time * 60
|
395
|
+
else
|
396
|
+
logger.debug "Running Chef Infra Compliance Phase on every run"
|
397
|
+
0
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
def interval_seconds_left
|
402
|
+
return 0 unless ::File.exist?(report_timing_file)
|
403
|
+
|
404
|
+
seconds_since_last_run = Time.now - ::File.mtime(report_timing_file)
|
405
|
+
interval_seconds - seconds_since_last_run
|
406
|
+
end
|
361
407
|
end
|
362
408
|
end
|
363
409
|
end
|
@@ -128,7 +128,7 @@ class Chef
|
|
128
128
|
|
129
129
|
if new_resource.cookbook_name
|
130
130
|
hash["cookbook_name"] = new_resource.cookbook_name
|
131
|
-
hash["cookbook_version"] = new_resource.cookbook_version
|
131
|
+
hash["cookbook_version"] = new_resource.cookbook_version&.version
|
132
132
|
hash["recipe_name"] = new_resource.recipe_name
|
133
133
|
end
|
134
134
|
|
@@ -37,7 +37,7 @@ class Chef
|
|
37
37
|
# due to a file being in use (usually a temporary file and a system file)
|
38
38
|
# \??\c:\temp\test.sys!\??\c:\winnt\system32\test.sys
|
39
39
|
# http://technet.microsoft.com/en-us/library/cc960241.aspx
|
40
|
-
registry_value_exists?(
|
40
|
+
registry_value_exists?("HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager", { name: "PendingFileRenameOperations" }) ||
|
41
41
|
|
42
42
|
# RebootRequired key contains Update IDs with a value of 1 if they require a reboot.
|
43
43
|
# The existence of RebootRequired alone is sufficient on my Windows 8.1 workstation in Windows Update
|
data/lib/chef/exceptions.rb
CHANGED
@@ -308,6 +308,16 @@ class Chef
|
|
308
308
|
super("No secret service provided. Supported services are: :#{fetcher_service_names.join(" :")}")
|
309
309
|
end
|
310
310
|
end
|
311
|
+
|
312
|
+
class Azure
|
313
|
+
class IdentityNotFound < RuntimeError
|
314
|
+
def initialize
|
315
|
+
super("The managed identity could not be found. This could mean one of the following things:\n\n" \
|
316
|
+
" 1. The VM has no system or user assigned identities.\n" \
|
317
|
+
" 2. The managed identity object_id or client_id that was specified is not assigned to the VM.\n")
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
311
321
|
end
|
312
322
|
|
313
323
|
# Exception class for collecting multiple failures. Used when running
|
@@ -104,13 +104,14 @@ class Chef
|
|
104
104
|
#
|
105
105
|
# @param script [String] script to run
|
106
106
|
# @param interpreter [Symbol] the interpreter type, `:powershell` or `:pwsh`
|
107
|
+
# @param timeout [Integer, nil] timeout in seconds.
|
107
108
|
# @return [Chef::PowerShell] output
|
108
|
-
def powershell_exec(script, interpreter = :powershell)
|
109
|
+
def powershell_exec(script, interpreter = :powershell, timeout: -1)
|
109
110
|
case interpreter
|
110
111
|
when :powershell
|
111
|
-
Chef::PowerShell.new(script)
|
112
|
+
Chef::PowerShell.new(script, timeout: timeout)
|
112
113
|
when :pwsh
|
113
|
-
Chef::Pwsh.new(script)
|
114
|
+
Chef::Pwsh.new(script, timeout: timeout)
|
114
115
|
else
|
115
116
|
raise ArgumentError, "Expected interpreter of :powershell or :pwsh"
|
116
117
|
end
|
@@ -118,8 +119,8 @@ class Chef
|
|
118
119
|
|
119
120
|
# The same as the #powershell_exec method except this will raise
|
120
121
|
# Chef::PowerShell::CommandFailed if the command fails
|
121
|
-
def powershell_exec!(script, interpreter = :powershell)
|
122
|
-
cmd = powershell_exec(script, interpreter)
|
122
|
+
def powershell_exec!(script, interpreter = :powershell, **options)
|
123
|
+
cmd = powershell_exec(script, interpreter, **options)
|
123
124
|
cmd.error!
|
124
125
|
cmd
|
125
126
|
end
|
data/lib/chef/mixin/why_run.rb
CHANGED
@@ -242,8 +242,12 @@ class Chef
|
|
242
242
|
end
|
243
243
|
end
|
244
244
|
|
245
|
-
|
246
|
-
|
245
|
+
attr_accessor :action
|
246
|
+
|
247
|
+
def initialize(resource, run_context, action)
|
248
|
+
@resource = resource
|
249
|
+
@run_context = run_context
|
250
|
+
@action = action
|
247
251
|
@assertions = Hash.new { |h, k| h[k] = [] }
|
248
252
|
@blocked_actions = []
|
249
253
|
end
|
@@ -305,6 +309,8 @@ class Chef
|
|
305
309
|
# "You don't have sufficient privileges to delete #{@new_resource.path}")
|
306
310
|
# end
|
307
311
|
def assert(*actions)
|
312
|
+
return unless actions.include?(action.to_sym) || actions.include?(:all_actions)
|
313
|
+
|
308
314
|
assertion = Assertion.new
|
309
315
|
yield assertion
|
310
316
|
actions.each { |action| @assertions[action] << assertion }
|
data/lib/chef/powershell.rb
CHANGED
@@ -33,15 +33,16 @@ class Chef
|
|
33
33
|
# Requires: .NET Framework 4.0 or higher on the target machine.
|
34
34
|
#
|
35
35
|
# @param script [String] script to run
|
36
|
+
# @param timeout [Integer, nil] timeout in seconds.
|
36
37
|
# @return [Object] output
|
37
|
-
def initialize(script)
|
38
|
+
def initialize(script, timeout: -1)
|
38
39
|
# This Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim
|
39
40
|
# Every merge into that repo triggers a Habitat build and promotion. Running
|
40
41
|
# the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down
|
41
42
|
# the built packages and copy the binaries to distro/ruby_bin_folder. Bundle install
|
42
43
|
# ensures that the correct architecture binaries are installed into the path.
|
43
44
|
@dll ||= "Chef.PowerShell.Wrapper.dll"
|
44
|
-
exec(script)
|
45
|
+
exec(script, timeout: timeout)
|
45
46
|
end
|
46
47
|
|
47
48
|
#
|
@@ -64,12 +65,13 @@ class Chef
|
|
64
65
|
raise Chef::PowerShell::CommandFailed, "Unexpected exit in PowerShell command: #{@errors}" if error?
|
65
66
|
end
|
66
67
|
|
67
|
-
|
68
|
+
private
|
68
69
|
|
69
|
-
def exec(script)
|
70
|
+
def exec(script, timeout: -1)
|
70
71
|
FFI.ffi_lib @dll
|
71
|
-
FFI.attach_function :execute_powershell, :ExecuteScript,
|
72
|
-
|
72
|
+
FFI.attach_function :execute_powershell, :ExecuteScript, %i{string int}, :pointer
|
73
|
+
timeout = -1 if timeout == 0 || timeout.nil?
|
74
|
+
execution = FFI.execute_powershell(script, timeout).read_utf16string
|
73
75
|
hashed_outcome = Chef::JSONCompat.parse(execution)
|
74
76
|
@result = Chef::JSONCompat.parse(hashed_outcome["result"])
|
75
77
|
@errors = hashed_outcome["errors"]
|
data/lib/chef/provider/cron.rb
CHANGED
@@ -92,7 +92,7 @@ class Chef
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
action :create do
|
95
|
+
action :create, description: "Create an entry in a cron table file (crontab). If an entry already exists (but does not match), update that entry to match." do
|
96
96
|
crontab = ""
|
97
97
|
newcron = ""
|
98
98
|
cron_found = false
|
@@ -100,7 +100,10 @@ class Chef
|
|
100
100
|
newcron = get_crontab_entry
|
101
101
|
|
102
102
|
if @cron_exists
|
103
|
-
|
103
|
+
# Only compare the crontab if the current resource has a set command.
|
104
|
+
# This may not be set in cases where the Chef comment exists but the
|
105
|
+
# crontab command was commented out.
|
106
|
+
if current_resource.property_is_set?(:command) && !cron_different?
|
104
107
|
logger.debug("#{new_resource}: Skipping existing cron entry")
|
105
108
|
return
|
106
109
|
end
|
@@ -146,7 +149,7 @@ class Chef
|
|
146
149
|
end
|
147
150
|
end
|
148
151
|
|
149
|
-
action :delete do
|
152
|
+
action :delete, description: "Delete an entry from a cron table file (crontab)." do
|
150
153
|
if @cron_exists
|
151
154
|
crontab = ""
|
152
155
|
cron_found = false
|
@@ -121,7 +121,7 @@ class Chef
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
-
action :create do
|
124
|
+
action :create, description: "Create a directory. If a directory already exists (but does not match), update that directory to match." do
|
125
125
|
unless ::File.exist?(new_resource.path)
|
126
126
|
converge_by("create new directory #{new_resource.path}") do
|
127
127
|
if new_resource.recursive == true
|
@@ -137,7 +137,7 @@ class Chef
|
|
137
137
|
load_resource_attributes_from_file(new_resource) unless Chef::Config[:why_run]
|
138
138
|
end
|
139
139
|
|
140
|
-
action :delete do
|
140
|
+
action :delete, description: "Delete a directory." do
|
141
141
|
if ::File.exist?(new_resource.path)
|
142
142
|
converge_by("delete existing directory #{new_resource.path}") do
|
143
143
|
if new_resource.recursive == true
|
data/lib/chef/provider/git.rb
CHANGED
@@ -87,7 +87,7 @@ iface <%= new_resource.device %> <%= new_resource.family %> static
|
|
87
87
|
directory INTERFACES_DOT_D_DIR
|
88
88
|
|
89
89
|
# roll our own file_edit resource, this will not get reported until we have a file_edit resource
|
90
|
-
interfaces_dot_d_for_regexp = INTERFACES_DOT_D_DIR.gsub(/\./,
|
90
|
+
interfaces_dot_d_for_regexp = INTERFACES_DOT_D_DIR.gsub(/\./, "\\.") # escape dots for the regexp
|
91
91
|
regexp = %r{^\s*source\s+#{interfaces_dot_d_for_regexp}/\*\s*$}
|
92
92
|
|
93
93
|
return if ::File.exist?(INTERFACES_FILE) && regexp.match(IO.read(INTERFACES_FILE))
|
@@ -168,7 +168,7 @@ class Chef
|
|
168
168
|
end
|
169
169
|
end
|
170
170
|
|
171
|
-
action :add do
|
171
|
+
action :add, description: "Run ifconfig to configure a network interface and (on some platforms) write a configuration file for that network interface." do
|
172
172
|
# check to see if load_current_resource found interface in ifconfig
|
173
173
|
unless current_resource.inet_addr
|
174
174
|
unless new_resource.device == loopback_device
|
@@ -183,7 +183,7 @@ class Chef
|
|
183
183
|
generate_config
|
184
184
|
end
|
185
185
|
|
186
|
-
action :enable do
|
186
|
+
action :enable, description: "Run ifconfig to enable a network interface." do
|
187
187
|
# check to see if load_current_resource found ifconfig
|
188
188
|
# enables, but does not manage config files
|
189
189
|
return if current_resource.inet_addr
|
@@ -196,7 +196,7 @@ class Chef
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
-
action :delete do
|
199
|
+
action :delete, description: "Run ifconfig to disable a network interface and (on some platforms) delete that network interface’s configuration file." do
|
200
200
|
# check to see if load_current_resource found the interface
|
201
201
|
if current_resource.device
|
202
202
|
command = delete_command
|
@@ -210,7 +210,7 @@ class Chef
|
|
210
210
|
delete_config
|
211
211
|
end
|
212
212
|
|
213
|
-
action :disable do
|
213
|
+
action :disable, description: "Run ifconfig to disable a network interface." do
|
214
214
|
# check to see if load_current_resource found the interface
|
215
215
|
# disables, but leaves config files in place.
|
216
216
|
if current_resource.device
|
@@ -29,10 +29,16 @@ class Chef
|
|
29
29
|
# "findmnt" outputs the mount points with volume.
|
30
30
|
# Convert the mount_point of the resource to a real path in case it
|
31
31
|
# contains symlinks in its parents dirs.
|
32
|
+
def loop_mount_points
|
33
|
+
# get loop_mount_points only if not initialized earlier
|
34
|
+
@loop_mount_points ||= shell_out!("losetup -a").stdout
|
35
|
+
|
36
|
+
rescue Errno::ENOENT
|
37
|
+
@loop_mount_points = ""
|
38
|
+
end
|
32
39
|
|
33
40
|
def mounted?
|
34
41
|
mounted = false
|
35
|
-
|
36
42
|
real_mount_point = if ::File.exists? @new_resource.mount_point
|
37
43
|
::File.realpath(@new_resource.mount_point)
|
38
44
|
else
|
@@ -45,6 +51,14 @@ class Chef
|
|
45
51
|
when /\A#{Regexp.escape(real_mount_point)}\s+#{device_mount_regex}\s/
|
46
52
|
mounted = true
|
47
53
|
logger.trace("Special device #{device_logstring} mounted as #{real_mount_point}")
|
54
|
+
# Permalink for loop type devices mount points https://rubular.com/r/a0bS4p2RvXsGxx
|
55
|
+
when %r{\A#{Regexp.escape(real_mount_point)}\s+\/dev\/loop+[0-9]+\s}
|
56
|
+
loop_mount_points.each_line do |mount_point|
|
57
|
+
if mount_point.include? device_real
|
58
|
+
mounted = true
|
59
|
+
break
|
60
|
+
end
|
61
|
+
end
|
48
62
|
# Permalink for multiple devices mounted to the same mount point(i.e. '/proc') https://rubular.com/r/a356yzspU7N9TY
|
49
63
|
when %r{\A#{Regexp.escape(real_mount_point)}\s+([/\w])+\s}
|
50
64
|
mounted = false
|
@@ -64,4 +78,4 @@ class Chef
|
|
64
78
|
end
|
65
79
|
end
|
66
80
|
end
|
67
|
-
end
|
81
|
+
end
|
@@ -108,7 +108,7 @@ class Chef
|
|
108
108
|
headers["Authorization"] = "Bearer #{new_resource.auth_token}" if new_resource.auth_token
|
109
109
|
|
110
110
|
Chef::JSONCompat.parse(http.get(url, headers))
|
111
|
-
rescue Net::
|
111
|
+
rescue Net::HTTPClientException
|
112
112
|
nil
|
113
113
|
end
|
114
114
|
end
|
@@ -17,13 +17,13 @@
|
|
17
17
|
|
18
18
|
require_relative "../package"
|
19
19
|
require_relative "../../resource/powershell_package"
|
20
|
-
require_relative "../../mixin/
|
20
|
+
require_relative "../../mixin/powershell_exec"
|
21
21
|
|
22
22
|
class Chef
|
23
23
|
class Provider
|
24
24
|
class Package
|
25
25
|
class Powershell < Chef::Provider::Package
|
26
|
-
include Chef::Mixin::
|
26
|
+
include Chef::Mixin::PowershellExec
|
27
27
|
|
28
28
|
provides :powershell_package
|
29
29
|
|
@@ -54,9 +54,9 @@ class Chef
|
|
54
54
|
# Installs the package specified with the version passed else latest version will be installed
|
55
55
|
def install_package(names, versions)
|
56
56
|
names.each_with_index do |name, index|
|
57
|
-
cmd =
|
57
|
+
cmd = powershell_exec(build_powershell_package_command("Install-Package '#{name}'", versions[index]), timeout: new_resource.timeout)
|
58
58
|
next if cmd.nil?
|
59
|
-
raise Chef::Exceptions::PowershellCmdletException, "Failed to install package due to catalog signing error, use skip_publisher_check to force install" if /SkipPublisherCheck/.match?(cmd.
|
59
|
+
raise Chef::Exceptions::PowershellCmdletException, "Failed to install package due to catalog signing error, use skip_publisher_check to force install" if /SkipPublisherCheck/.match?(cmd.error)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -64,11 +64,12 @@ class Chef
|
|
64
64
|
def remove_package(names, versions)
|
65
65
|
names.each_with_index do |name, index|
|
66
66
|
if versions && !versions[index].nil?
|
67
|
-
|
67
|
+
powershell_exec(build_powershell_package_command("Uninstall-Package '#{name}'", versions[index]), timeout: new_resource.timeout)
|
68
68
|
else
|
69
69
|
version = "0"
|
70
70
|
until version.empty?
|
71
|
-
version =
|
71
|
+
version = powershell_exec(build_powershell_package_command("Uninstall-Package '#{name}'"), timeout: new_resource.timeout).result
|
72
|
+
version = version.strip if version.respond_to?(:strip)
|
72
73
|
unless version.empty?
|
73
74
|
logger.info("Removed package '#{name}' with version #{version}")
|
74
75
|
end
|
@@ -82,13 +83,14 @@ class Chef
|
|
82
83
|
versions = []
|
83
84
|
new_resource.package_name.each_with_index do |name, index|
|
84
85
|
version = if new_resource.version && !new_resource.version[index].nil?
|
85
|
-
|
86
|
+
powershell_exec(build_powershell_package_command("Find-Package '#{name}'", new_resource.version[index]), timeout: new_resource.timeout).result
|
86
87
|
else
|
87
|
-
|
88
|
+
powershell_exec(build_powershell_package_command("Find-Package '#{name}'"), timeout: new_resource.timeout).result
|
88
89
|
end
|
89
90
|
if version.empty?
|
90
91
|
version = nil
|
91
92
|
end
|
93
|
+
version = version.strip if version.respond_to?(:strip)
|
92
94
|
versions.push(version)
|
93
95
|
end
|
94
96
|
versions
|
@@ -99,13 +101,14 @@ class Chef
|
|
99
101
|
version_list = []
|
100
102
|
new_resource.package_name.each_with_index do |name, index|
|
101
103
|
version = if new_resource.version && !new_resource.version[index].nil?
|
102
|
-
|
104
|
+
powershell_exec(build_powershell_package_command("Get-Package '#{name}'", new_resource.version[index]), timeout: new_resource.timeout).result
|
103
105
|
else
|
104
|
-
|
106
|
+
powershell_exec(build_powershell_package_command("Get-Package '#{name}'"), timeout: new_resource.timeout).result
|
105
107
|
end
|
106
108
|
if version.empty?
|
107
109
|
version = nil
|
108
110
|
end
|
111
|
+
version = version.strip if version.respond_to?(:strip)
|
109
112
|
version_list.push(version)
|
110
113
|
end
|
111
114
|
version_list
|
@@ -115,10 +115,90 @@ class Chef
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
+
def is_arch?(arch)
|
119
|
+
# cspell:disable-next
|
120
|
+
arches = %w{aarch64 alpha alphaev4 alphaev45 alphaev5 alphaev56 alphaev6 alphaev67 alphaev68 alphaev7 alphapca56 armv5tejl armv5tel armv5tl armv6l armv7l armv8l armv6hl armv7hl armv7hnl armv8hl i386 athlon geode i386 i486 i586 i686 ia64 mips mipsel mips64 mips64el noarch ppc ppc64 ppc64iseries ppc64p7 ppc64pseries ppc64le riscv32 riscv64 riscv128 s390 s390x sh3 sh4 sh4a sparc sparc64 sparc64v sparcv8 sparcv9 sparcv9v x86_64 amd64 ia32e}
|
121
|
+
arches.include?(arch)
|
122
|
+
end
|
123
|
+
|
124
|
+
# We have a provides line with an epoch in it and yum cannot parse that, so we
|
125
|
+
# need to deconstruct the args. This doesn't support splats which is why we
|
126
|
+
# only do it for this particularly narrow use case.
|
127
|
+
#
|
128
|
+
# name-epoch:version
|
129
|
+
# name-epoch:version.arch
|
130
|
+
# name-epoch:version-release
|
131
|
+
# name-epoch:version-release.arch
|
132
|
+
#
|
133
|
+
# @api private
|
134
|
+
def deconstruct_args(provides)
|
135
|
+
raise "provides must have an epoch in the version to deconstruct" unless provides =~ /^(\S+)-(\d+):(\S+)/
|
136
|
+
|
137
|
+
name = $1
|
138
|
+
epoch = $2
|
139
|
+
other = $3
|
140
|
+
ret = { "provides" => name, "epoch" => epoch }
|
141
|
+
maybe_arch = other.rpartition(".").last
|
142
|
+
arch = if is_arch?(maybe_arch)
|
143
|
+
other.delete_suffix!(".#{maybe_arch}")
|
144
|
+
maybe_arch
|
145
|
+
end
|
146
|
+
ret.merge!({ "arch" => arch }) if arch
|
147
|
+
(version, _, release) = other.rpartition("-")
|
148
|
+
if version.empty?
|
149
|
+
ret.merge!({ "version" => release }) # yeah, rpartition is just weird
|
150
|
+
else
|
151
|
+
ret.merge!({ "version" => version, "release" => release })
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# In the default case for the yum provider we now do terrible things with ruby
|
156
|
+
# to concatenate all the properties together to form a single string to feed to
|
157
|
+
# the python which favors using returnPackages/searchProvides over the
|
158
|
+
# searchNevra API. That means that these two different ways of constructing the
|
159
|
+
# resource are now perfectly identical:
|
160
|
+
#
|
161
|
+
# yum_package "zabbix-agent-4.0.15-1.fc31.x86_64"
|
162
|
+
#
|
163
|
+
# yum_package "zabbix-agent" do
|
164
|
+
# version "4.0.15-1.fc31"
|
165
|
+
# arch "x86_64"
|
166
|
+
# end
|
167
|
+
#
|
168
|
+
# This function handles turning the second form into the first form.
|
169
|
+
#
|
170
|
+
# In the case where the epoch is given in the version and we do not have any glob
|
171
|
+
# patterns that is handled by going the other way and calling deconstruct_args due
|
172
|
+
# to the yum libraries not supporting that calling pattern other than by searchNevra.
|
173
|
+
#
|
174
|
+
# NOTE: This is an ugly hack and should NOT be considered an endorsement of this approach
|
175
|
+
# towards any kind of features or bugfixes in the DNF provider. I'm doing this
|
176
|
+
# because YUM is sunsetting at this point and its very difficult to fight with the
|
177
|
+
# libraries on the python side of things.
|
178
|
+
#
|
179
|
+
# @api private
|
180
|
+
def combine_args(provides, version, arch)
|
181
|
+
provides = provides.dup
|
182
|
+
maybe_arch = provides.rpartition(".").last
|
183
|
+
if is_arch?(maybe_arch)
|
184
|
+
arch = maybe_arch
|
185
|
+
provides.delete_suffix!(".#{arch}")
|
186
|
+
end
|
187
|
+
provides = "#{provides}-#{version}" if version
|
188
|
+
provides = "#{provides}.#{arch}" if arch
|
189
|
+
# yum (on rhel7) can't handle an epoch in provides, but
|
190
|
+
# deconstructing the args can't handle dealing with globs
|
191
|
+
if provides =~ /-\d+:/ && provides !~ /[\*\?]/
|
192
|
+
deconstruct_args(provides)
|
193
|
+
else
|
194
|
+
{ "provides" => provides }
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
118
198
|
# @return Array<Version>
|
119
199
|
# NB: "options" here is the yum_package options hash and is deliberately not **opts
|
120
200
|
def package_query(action, provides, version: nil, arch: nil, options: {})
|
121
|
-
parameters =
|
201
|
+
parameters = combine_args(provides, version, arch)
|
122
202
|
repo_opts = options_params(options || {})
|
123
203
|
parameters.merge!(repo_opts)
|
124
204
|
# XXX: for now we close the rpmdb before and after every query with an enablerepo/disablerepo to clean the helpers internal state
|
@@ -137,25 +217,6 @@ class Chef
|
|
137
217
|
|
138
218
|
private
|
139
219
|
|
140
|
-
# i couldn't figure out how to decompose an evr on the python side, it seems reasonably
|
141
|
-
# painless to do it in ruby (generally massaging nevras in the ruby side is HIGHLY
|
142
|
-
# discouraged -- this is an "every rule has an exception" exception -- any additional
|
143
|
-
# functionality should probably trigger moving this regexp logic into python)
|
144
|
-
def add_version(hash, version)
|
145
|
-
epoch = nil
|
146
|
-
if version =~ /(\S+):(\S+)/
|
147
|
-
epoch = $1
|
148
|
-
version = $2
|
149
|
-
end
|
150
|
-
if version =~ /(\S+)-(\S+)/
|
151
|
-
version = $1
|
152
|
-
release = $2
|
153
|
-
end
|
154
|
-
hash["epoch"] = epoch unless epoch.nil?
|
155
|
-
hash["release"] = release unless release.nil?
|
156
|
-
hash["version"] = version
|
157
|
-
end
|
158
|
-
|
159
220
|
def query(action, parameters)
|
160
221
|
with_helper do
|
161
222
|
json = build_query(action, parameters)
|
@@ -174,11 +235,6 @@ class Chef
|
|
174
235
|
hash[param_name] = param_value unless param_value.nil?
|
175
236
|
end
|
176
237
|
|
177
|
-
# Special handling for certain action / param combos
|
178
|
-
if %i{whatinstalled whatavailable}.include?(action)
|
179
|
-
add_version(hash, parameters["version"]) unless parameters["version"].nil?
|
180
|
-
end
|
181
|
-
|
182
238
|
FFI_Yajl::Encoder.encode(hash)
|
183
239
|
end
|
184
240
|
|