ansible

Ansible: set_fact cannot access facts created in the same step

Using Ansible and the set_fact module, it is possible to set multiple facts within the same step, e.g. I discovered though that it is not possible to set multiple facts within the same step, if one of them references another created in the same step. For example, something like the following where results_a and results_b are both used to determine total_results: This will generate an error similar to the following:

Issue Removing SMB1 from Windows with Ansible

As part of a large configuration script for Windows, and executed via Ansible, one step was to remove SMB1. The official Microsoft Guidance on removing SMB1 states to use Disable-WindowsFeature - https://support.microsoft.com/en-gb/help/2696547/detect-enable-disable-smbv1-smbv2-smbv3-in-windows-and-windows-server I didn’t think too much more of this and simply added the step to the configuration script. However, upon executing it from Ansible I received the following error: This got me questioning why is the recommendation to use Disable-WindowsOptionalFeature when the detect method is Get-WindowsFeature?

Issues Installing SCVMM via Ansible and PowerShell

While working on a scenario where I needed to automate the installation of SCVMM 2019, firstly via PowerShell scripts and then those scripts plugged into an Ansible playbook, I encountered some failures during the Ansible execution of the PowerShell scripts. These same scripts had worked fine when run locally on the Windows 2016 Server designated to run SCVMM. The PowerShell scripts automated the install of three components; SQL, ADK and SCVMM.