Closed rajmartha26 closed 2 weeks ago
i also added the post here
Any one? any update on this issue?
@jborean93 can you look at this issue when you get a chance?
Unfortunately if your AV is blocking our process from running there's not much we can do about it. We rely on being able to start the process in the background to keep the updates installing in case there are network reboots and to get the intermediate output back. You will most likely have to look into Trellix to see how it can be configured to get this to run properly.
@jborean93 But same script works with the 2.9.27 while the AV running on the target server, so what is changed from 2.9.27 to 2.16.6? in 2.16.6 this script sending some thing new to target windows server which resulting AV to block the script to run,
I see you have a config file for 2.9 but not 2.16, have you tried copying that? This seems environment-specific, but you could debug possible differences between versions by running your reproducer against some ansible-core versions between 2.9 and 2.16 to narrow down a specific ansible-core version. Then you could check the release notes for any related changes, or try debugging potential differences by increasing the verbosity -vvvv
and enabling https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-debug (very noisy) to compare diffs with the version directly before the change.
@s-hertel we are using the same config file for both 2.9 and 2.16. i tryed to degug all possible ways, but stills ame issue,
But same script works with the 2.9.27 while the AV running on the target server, so what is changed from 2.9.27 to 2.16.6
The way the module was executed was changed in some older version of this collection which came out after 2.9. The change was made to fix a few issues like
become
caused problems in some environments which we couldn't solveThe change means that Ansible starts a task a bit differently from how it worked in Ansible 2.9 and unfortunately in your case it's doing it in a way that your AV doesn't like. We aren't doing anything problematic, just kicking off a scheduled task and trying to run a child process off that.
Unfortunately I don't really have much advice for you here as we are at the mercy of what your AV is doing. If it kills our task we don't have any control over that.
There are some things you can try:
log_path
to see if there are any more error details in there that might indicate where it's failingpsrp
connection plugin which might bypass how your AV is checking this processasync: 600
(the number may need to be higher depending on how long you expect it to run)win_updates
code from 2.9 and run that instead of the one from the collectionRunning with async
still uses the new code but it doesn't run it as a background process which Ansible polls for updates. This might be enough to satisfy your AV but I cannot guarantee that. If the 2.9 code works for you then you can still take a copy of both the action plugin and module code and rename it to something else. By calling this you'll go back to the old behaviour but keep in mind it will have no more updates from us.
Hi, Tried with async and still smae behaviour.
Unfortunately there is little else I can do here, we are running code that your Antivirus doesn't like. There are legitimate reasons why we run it like this unfortunately.
Closing as per the above.
SUMMARY
We are experiencing an issue where the win_update task fails to run on Windows servers when Trellix Threat Prevention is enabled. This issue started occurring after upgrading to Ansible version 2.16.6. The same playbook was working fine with Ansible version 2.9.7.
ISSUE TYPE
COMPONENT NAME
win_updates
ANSIBLE VERSION
Works with below Ansible version
Does not work with below Ansible version
COLLECTION VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
Windows server OS: Windows 2022 Trellix agent and threat prevtion installed: Yes
STEPS TO REPRODUCE
RUn the above playbook from Ansible version 2.16.2 on Windows 2022 server when Trellix agent installed and threat prrevetion enabled and playbook is faild with below error
I added below code as per Ansible Documentation, but still getting the same error
EXPECTED RESULTS
playbook should be successful
ACTUAL RESULTS