mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
parent
3d2ad47f55
commit
7e5e9bd7e8
1 changed files with 16 additions and 6 deletions
|
@ -69,9 +69,14 @@ If ( $do_comparison -eq $True ) {
|
||||||
{
|
{
|
||||||
# Something is different, actually do reg merge
|
# Something is different, actually do reg merge
|
||||||
$reg_import_args = @("IMPORT", "$path")
|
$reg_import_args = @("IMPORT", "$path")
|
||||||
& reg.exe $reg_import_args
|
$ret = & reg.exe $reg_import_args 2>&1
|
||||||
|
If ($LASTEXITCODE -eq 0) {
|
||||||
Set-Attr $result "changed" $True
|
Set-Attr $result "changed" $True
|
||||||
Set-Attr $result "difference_count" $comparison_result.count
|
Set-Attr $result "difference_count" $comparison_result.count
|
||||||
|
} Else {
|
||||||
|
Set-Attr $result "rc" $LASTEXITCODE
|
||||||
|
Fail-Json $result "$ret"
|
||||||
|
}
|
||||||
} Else {
|
} Else {
|
||||||
Set-Attr $result "difference_count" 0
|
Set-Attr $result "difference_count" 0
|
||||||
}
|
}
|
||||||
|
@ -82,9 +87,14 @@ If ( $do_comparison -eq $True ) {
|
||||||
} Else {
|
} Else {
|
||||||
# not comparing, merge and report changed
|
# not comparing, merge and report changed
|
||||||
$reg_import_args = @("IMPORT", "$path")
|
$reg_import_args = @("IMPORT", "$path")
|
||||||
& reg.exe $reg_import_args
|
$ret = & reg.exe $reg_import_args 2>&1
|
||||||
|
If ( $LASTEXITCODE -eq 0 ) {
|
||||||
Set-Attr $result "changed" $True
|
Set-Attr $result "changed" $True
|
||||||
Set-Attr $result "compared" $False
|
Set-Attr $result "compared" $False
|
||||||
|
} Else {
|
||||||
|
Set-Attr $result "rc" $LASTEXITCODE
|
||||||
|
Fail-Json $result "$ret"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Exit-Json $result
|
Exit-Json $result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue