Create a new play before this one to do your pretask.
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: [email protected] <[email protected]> on
behalf of [email protected] <[email protected]>
Sent: Wednesday, November 17, 2021 12:25:39 AM
To: Ansible Project <[email protected]>
Subject: [ansible-project] Reg: Service check and stop during windows update.
Hello All,
I am doing windows server patching for some of the windows servers on my
environment.
Now i have a requirement in which i have to check a service if it exists and
stop it before installing update/patch.
can someone please help me on this such that playbook should first check for
the service, stop it and then go for windows patching.
Script i am using now for windows patch update:
- name: Windows Update
hosts: all
gather_facts: false
tasks:
- name: Running Windows Update
win_updates:
category_names:
['SecurityUpdates','CriticalUpdates','UpdateRollups', 'Updates',
'DefinitionUpdates']
reboot: yes
Thanks in advance
--
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]<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/794e7384-553c-4fb0-805b-e6285c560d80n%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/794e7384-553c-4fb0-805b-e6285c560d80n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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/SYBP282MB35259AA02D6679A9506C05F8AD999%40SYBP282MB3525.AUSP282.PROD.OUTLOOK.COM.