Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use with version of Ansible above 2.13 #22

Closed
mfortin opened this issue Feb 12, 2024 · 4 comments
Closed

Unable to use with version of Ansible above 2.13 #22

mfortin opened this issue Feb 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mfortin
Copy link
Contributor

mfortin commented Feb 12, 2024

Describe the Issue
Using ansible 2.16.3 there is an error while execuiting this role

command/shell - remove deprecated warn module param - Ansible 2.14.0 Release Notes
Deprecation announcement - Ansible 2.11 Release Notes

Expected Behavior
No errors

Actual Behavior

TASK [AMAZON2-CIS : 1.2.2 | AUDIT | Ensure package manager repositories are configured | Get repo list] ***
fatal: [10.0.0.2]: FAILED! => changed=false
  msg: 'Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, expand_argument_vars, removes, stdin, stdin_add_newline, strip_empty_ends.'

Control(s) Affected

  • 1.1.22
  • 1.2.2
  • 3.1.2
  • 6.2.1
  • handlers
  • pre/post rememediation audit

Environment (please complete the following information):

  • Ansible Version: 2.16.3
  • Host Python Version: Python 3.7.6
  • Ansible Server Python Version: Python 3.11.7
  • branch: devel
  • Additional Details: warn: false was deprecated

Additional Notes
Module FQCN are not used in the role

Possible Solution
Removing warn: false from commands/shell ansible tasks.

@mfortin mfortin added the bug Something isn't working label Feb 12, 2024
@mfortin mfortin mentioned this issue Feb 12, 2024
@danilo-lopes
Copy link

Same error here, trying on latest Amazon Linux 2 instances.

amazon-ebs.atom-amzn2-ami: TASK [cis-amazon-linux : 1.2.2 | AUDIT | Ensure package manager repositories are configured | Get repo list] ***
    amazon-ebs.atom-amzn2-ami: fatal: [default]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, expand_argument_vars, removes, stdin, stdin_add_newline, strip_empty_ends."}
  • Ansible Version: 2.16.4
  • Python 3 Version: 3.12.1
  • Project Branch: devel

@danilo-lopes
Copy link

Is this project active ?

@uk-bolly
Copy link
Member

uk-bolly commented Mar 19, 2024

hi @danilo-lopes

Yes this is still active, i've just released v3.0.0 to the subscribers last week. Its not active in the community as much it seems.
Im picking up the quick fixes over the next couple of days.

Thanks

uk-bolly

@mfortin
Copy link
Contributor Author

mfortin commented Mar 24, 2024

#24 addressed the compatibility issues with latest Ansible CLI

@mfortin mfortin closed this as completed Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants