PeterMosmans / ansible-role-virtualbox-guest

Ansible role for building and installing VirtualBox guest additions
GNU General Public License v3.0
20 stars 22 forks source link

Unsupported parameters #31

Open ansiblejunky opened 1 year ago

ansiblejunky commented 1 year ago

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 commented 1 year ago

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.

PeterMosmans commented 1 year ago

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

carefreecaribou commented 1 year ago

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