mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-22 00:00:22 -07:00
Bump deps for ntlm-auth and PSScriptAnalyzer (#55269)
This commit is contained in:
parent
65dcb4242a
commit
04cae4134f
7 changed files with 63 additions and 13 deletions
|
@ -48,7 +48,7 @@ Function Exit-Json($obj)
|
|||
}
|
||||
|
||||
if (-not $obj.ContainsKey('changed')) {
|
||||
Set-Attr $obj "changed" $false
|
||||
Set-Attr -obj $obj -name "changed" -value $false
|
||||
}
|
||||
|
||||
Write-Output $obj | ConvertTo-Json -Compress -Depth 99
|
||||
|
@ -79,11 +79,11 @@ Function Fail-Json($obj, $message = $null)
|
|||
}
|
||||
|
||||
# Still using Set-Attr for PSObject compatibility
|
||||
Set-Attr $obj "msg" $message
|
||||
Set-Attr $obj "failed" $true
|
||||
Set-Attr -obj $obj -name "msg" -value $message
|
||||
Set-Attr -obj $obj -name "failed" -value $true
|
||||
|
||||
if (-not $obj.ContainsKey('changed')) {
|
||||
Set-Attr $obj "changed" $false
|
||||
Set-Attr -obj $obj -name "changed" -value $false
|
||||
}
|
||||
|
||||
Write-Output $obj | ConvertTo-Json -Compress -Depth 99
|
||||
|
|
|
@ -191,7 +191,15 @@ function Present($path, $regexp, $line, $insertafter, $insertbefore, $create, $b
|
|||
$result.backup = $result.backup_file
|
||||
}
|
||||
|
||||
$after = WriteLines $lines $path $linesep $encodingobj $validate $check_mode;
|
||||
$writelines_params = @{
|
||||
outlines = $lines
|
||||
path = $path
|
||||
linesep = $linesep
|
||||
encodingobj = $encodingobj
|
||||
validate = $validate
|
||||
check_mode = $check_mode
|
||||
}
|
||||
$after = WriteLines @writelines_params;
|
||||
|
||||
if ($diff_support) {
|
||||
$result.diff.after = $after;
|
||||
|
@ -273,7 +281,15 @@ function Absent($path, $regexp, $line, $backup, $validate, $encodingobj, $linese
|
|||
$result.backup = $result.backup_file
|
||||
}
|
||||
|
||||
$after = WriteLines $left $path $linesep $encodingobj $validate $check_mode;
|
||||
$writelines_params = @{
|
||||
outlines = $left
|
||||
path = $path
|
||||
linesep = $linesep
|
||||
encodingobj = $encodingobj
|
||||
validate = $validate
|
||||
check_mode = $check_mode
|
||||
}
|
||||
$after = WriteLines @writelines_params;
|
||||
|
||||
if ($diff_support) {
|
||||
$result.diff.after = $after;
|
||||
|
@ -395,7 +411,22 @@ If ($state -eq "present") {
|
|||
$insertafter = "EOF";
|
||||
}
|
||||
|
||||
Present $path $regexp $line $insertafter $insertbefore $create $backup $backrefs $validate $encodingobj $linesep $check_mode $diff_support;
|
||||
$present_params = @{
|
||||
path = $path
|
||||
regexp = $regexp
|
||||
line = $line
|
||||
insertafter = $insertafter
|
||||
insertbefore = $insertbefore
|
||||
create = $create
|
||||
backup = $backup
|
||||
backrefs = $backrefs
|
||||
validate = $validate
|
||||
encodingobj = $encodingobj
|
||||
linesep = $linesep
|
||||
check_mode = $check_mode
|
||||
diff_support = $diff_support
|
||||
}
|
||||
Present @present_params;
|
||||
|
||||
}
|
||||
ElseIf ($state -eq "absent") {
|
||||
|
@ -404,5 +435,16 @@ ElseIf ($state -eq "absent") {
|
|||
Fail-Json @{} "one of line= or regexp= is required with state=absent";
|
||||
}
|
||||
|
||||
Absent $path $regexp $line $backup $validate $encodingobj $linesep $check_mode $diff_support;
|
||||
$absent_params = @{
|
||||
path = $path
|
||||
regexp = $regexp
|
||||
line = $line
|
||||
backup = $backup
|
||||
validate = $validate
|
||||
encodingobj = $encodingobj
|
||||
linesep = $linesep
|
||||
check_mode = $check_mode
|
||||
diff_support = $diff_support
|
||||
}
|
||||
Absent @absent_params;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ function Copy-Xml($dest, $src, $xmlorig) {
|
|||
foreach ($childnode in $src.get_ChildNodes()) {
|
||||
if ($childnode.get_NodeType() -eq "Element") {
|
||||
$newnode = $xmlorig.CreateElement($childnode.get_Name(), $xmlorig.get_DocumentElement().get_NamespaceURI())
|
||||
Copy-Xml $newnode $childnode $xmlorig
|
||||
Copy-Xml -dest $newnode -src $childnode -xmlorig $xmlorig
|
||||
$dest.AppendChild($newnode) | Out-Null
|
||||
} elseif ($childnode.get_NodeType() -eq "Text") {
|
||||
$dest.set_InnerText($childnode.get_InnerText())
|
||||
|
@ -126,7 +126,7 @@ if ($type -eq "element") {
|
|||
}
|
||||
|
||||
$child = $xmlorig.CreateElement($xmlchild.get_DocumentElement().get_Name(), $xmlorig.get_DocumentElement().get_NamespaceURI())
|
||||
Copy-Xml $child $xmlchild.DocumentElement $xmlorig
|
||||
Copy-Xml -dest $child -src $xmlchild.DocumentElement -xmlorig $xmlorig
|
||||
|
||||
$node = $xmlorig.SelectSingleNode($xpath, $namespaceMgr)
|
||||
if ($node.get_NodeType() -eq "Document") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue