Uninstalling Houdini with Ansible

   2041   1   1
User Avatar
Member
2 posts
Joined: 9月 2019
Offline
Hi,

I'm trying to uninstall Houdini 17.0 with Ansible, I've tried the following:

- name: Uninstall Houdini 17.0.416
hosts: all
tasks:
- name: uninstall houdini
win_command: cmd.exe “C:\\Program Files\\Side Effects Software\\Houdini 17.0.416\\Uninstall Houdini.exe /S”

- name: uninstall houdini 2.0
win_package:
path: C:\Program Files\Side Effects Software\Houdini 17.0.416\Uninstall Houdini.exe
product_id: Houdini 17.0.416
arguments: /S
state: absent

This is the given verbose output:


TASK ************************************************************************************************************
changed: => {
“changed”: true,
“cmd”: “cmd.exe \”C:\\\\Program Files\\\\Side Effects Software\\\\Houdini 17.0.416\\\\Uninstall Houdini.exe /S\“”,
“delta”: “0:00:00.320820”,
“end”: “2019-09-20 04:22:06.665368”,
“rc”: 0,
“start”: “2019-09-20 04:22:06.344548”,
“stderr”: “”,
“stderr_lines”: ,
“stdout”: "Microsoft Windows \r\n© 2018 Microsoft Corporation. All rights reserved.\r\n\r\nC:\\Users\\admin>\r\nC:\\Users\\admin>“,
”stdout_lines“: [
”Microsoft Windows “,
”© 2018 Microsoft Corporation. All rights reserved.“,
”“,
”C:\\Users\\admin>“,
”C:\\Users\\admin>"
]
}

TASK ********************************************************************************************************
changed: => {
“changed”: true,
“exit_code”: 0,
“rc”: 0,
“reboot_required”: false,
“restart_required”: false
}
META: ran handlers
META: ran handlers

As you can see, both of these run, and return a zero exit code. However, neither way seems to ACTUALLY uninstall Houdini. Has anyone been successful uninstalling Houdini with Ansible? Or does anyone have any ideas of what may be the issue or how to debug it?
I'm using Ansible version 2.7.10

Thanks
User Avatar
Member
1 posts
Joined: 6月 2020
Offline
I think it's related to the uninstaller spawning another process that does the actual uninstalling. Once the first process returns, Ansible kills the connection, and with it the spawned process, I think. win_package does have a special parameter to enable waiting for subprocesses to finish before continuing, but it didn't work when I tried.

I found the solution in the 'async' parameter. It waits for a specified maximum amount of time. This is the configuration that works for me:

- name: Uninstall Houdini win_command: '"Uninstall Houdini.exe" /S' args: chdir: C:\Program Files\Side Effects Software\Houdini {{houdini_version}} become: yes async: 500
  • Quick Links