ansible-role-virtualbox-guest icon indicating copy to clipboard operation
ansible-role-virtualbox-guest copied to clipboard

Unsupported parameters

Open ansiblejunky opened this issue 2 years ago • 3 comments

Running it against a RHEL9 vagrant box, and getting errors:

TASK [ansible-role-virtualbox-guest : Check if VBoxGuest additions ISO is mounted] *************************************************************************************************************************************************************************
Friday 28 July 2023  09:27:56 -0700 (0:00:00.034)       0:00:07.275 ***********
Friday 28 July 2023  09:27:56 -0700 (0:00:00.034)       0:00:07.275 ***********
fatal: [aap.example.com]: FAILED! => {
    "changed": false,
    "changed_when_result": "The conditional check 'mount_path is defined and not mount_path.stdout' failed. The error was: error while evaluating conditional (mount_path is defined and not mount_path.stdout): 'dict object' has no attribute 'stdout'. 'dict object' has no attribute 'stdout'"
}

MSG:

Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, stdin_add_newline, strip_empty_ends.

ansiblejunky avatar Jul 28 '23 16:07 ansiblejunky

It appears to be with the warn argument on the shell module. The warn parameter for shell was deprecated in Ansible 2.11 and removed in Ansible 2.14. So removing this from the tasks/main.yml and this code works again.

ansiblejunky avatar Jul 28 '23 16:07 ansiblejunky

Thanks for the report @ansiblejunky - feel free to open a PR so we can fix it for everyone ;)

PeterMosmans avatar Aug 03 '23 15:08 PeterMosmans

I created a pull request for this issue. https://github.com/PeterMosmans/ansible-role-virtualbox-guest/pull/32

carefreecaribou avatar Sep 28 '23 15:09 carefreecaribou