How can I incorporate this registry check before my playbook runs to
install .net 4.8:
(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework
Setup\NDP\v4\Full").version -lt 4.8
The above should only run my playbook, if 4.8 isnt installed. If version is
less than 4.8 run the below playbook, else skip
My playbook to install .net 4.8:
- name: Copy .net 4.8 Files
ansible.windows.win_copy:
src: /etc/ansible/roles/net481/files/ndp48-x86-x64-allos-enu.exe
dest: C:\Scripts\
state: present
- name: Install .net 4.8
ansible.builtin.script: /etc/ansible/roles/onprembaseline/files/net48.ps1
register: script_run
- name: Reboot after .NET 4.8 Install
ansible.windows.win_reboot:
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/394d3f6d-13dc-42ab-9c18-cd923643125an%40googlegroups.com.