Skip to content

Commit

Permalink
Fix for long computer names (#114)
Browse files Browse the repository at this point in the history
* Fix for long computer names

* Added changelog fragement and improve tests

---------

Co-authored-by: Jordan Borean <[email protected]>
  • Loading branch information
aristotelos and jborean93 authored Apr 29, 2024
1 parent a7b214f commit 88575f9
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 36 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/membership-long-name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bugfixes:
- >-
microsoft.ad.membership - Fix hostname check to work with hostnames longer than 15 characters long -
https://github.com/ansible-collections/microsoft.ad/issues/113
2 changes: 1 addition & 1 deletion plugins/modules/membership.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Function Get-CurrentState {
}

[PSCustomObject]@{
HostName = $env:COMPUTERNAME
HostName = [System.Net.Dns]::GetHostName()
PartOfDomain = $cs.PartOfDomain
DnsDomainName = $domainName
WorkgroupName = $cs.Workgroup
Expand Down
Loading

0 comments on commit 88575f9

Please sign in to comment.