1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Format BIOS date string like on Linux

This commit is contained in:
Dag Wieers 2016-05-28 13:31:44 +02:00 committed by Matt Clay
parent 457ccc2e73
commit f8b0cf50b4

View file

@ -83,7 +83,7 @@ Set-Attr $result.ansible_facts "ansible_interfaces" $formattednetcfg
Set-Attr $result.ansible_facts "ansible_architecture" $win32_os.OSArchitecture
# FIXME: Reformat the date to MM/DD/YEAR format
Set-Attr $result.ansible_facts "ansible_bios_date" $win32_bios.ReleaseDate
Set-Attr $result.ansible_facts "ansible_bios_date" $win32_bios.ReleaseDate.ToString("MM/dd/yyyy")
Set-Attr $result.ansible_facts "ansible_bios_version" $win32_bios.SMBIOSBIOSVersion
Set-Attr $result.ansible_facts "ansible_hostname" $env:COMPUTERNAME
Set-Attr $result.ansible_facts "ansible_fqdn" "$([System.Net.Dns]::GetHostByName((hostname)).HostName)"