ansible-collections / ansible.windows

Windows core collection for Ansible
https://galaxy.ansible.com/ansible/windows
GNU General Public License v3.0
233 stars 157 forks source link

Add ansible_win_rm_certificate_thumbprint to facts #611

Closed rsdoherty closed 1 month ago

rsdoherty commented 1 month ago
SUMMARY

Adds ansible_win_rm_certificate_thumbprint to the facts collected as part of the WinRM facts.

ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION

Seeing as we're already collecting this data, it would be handy to expose it as a fact for use later (for certificate renewals/updates). Would there be any objections to adding it to the facts like I have implemented below?

PLAY [Test playbook] **********************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************
ok: [test-win-vm]

TASK [Print WinRM certificate expiry] *****************************************************************************************************************************************************************************************************************************
ok: [test-win-vm] => {
    "ansible_win_rm_certificate_expires": "2021-11-22 13:17:09"
}

TASK [Print WinRM certificate thumbprint] *************************************************************************************************************************************************************************************************************************
ok: [test-win-vm] => {
    "ansible_win_rm_certificate_thumbprint": "D96A5DC19B1DC6A939BF418B3F48756B0ECC636E"
}

PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************
test-win-vm                 : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
rsdoherty commented 1 month ago

No worries! How often are new releases published?

jborean93 commented 1 month ago

I try and aim for one every 2-3 months. There’s no set schedule so it’s a really just when there’s enough to justify a new release.