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

Warn has been removed from Ansible #21

Open
SDAChess opened this issue Aug 13, 2023 · 3 comments
Open

Warn has been removed from Ansible #21

SDAChess opened this issue Aug 13, 2023 · 3 comments

Comments

@SDAChess
Copy link

The warn attribute has been deprecated. Using Ansible 2.15.2 gives the following error while running the role:

TASK [shelleg.ansible_role_portainer : Define Endpoints] *************************************************************************
failed: [portainer-1] (item={'name': 'local', 'url': ''}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "local", "url": ""}, "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."}
failed: [portainer-1] (item={'name': 'remote1', 'url': 'tcp://1.2.3.4:2375'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "remote1", "url": "tcp://1.2.3.4:2375"}, "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."}
failed: [portainer-1] (item={'name': 'remote2', 'url': 'tcp://5.6.7.8:2375'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "remote2", "url": "tcp://5.6.7.8:2375"}, "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."}
@ricorx7
Copy link

ricorx7 commented Aug 23, 2023

Looks like @SDAChess fork fixed the issue:

master...SDAChess:ansible-role-portainer:master

Cannot create a pull request from repo @SDAChess.

@SDAChess
Copy link
Author

SDAChess commented Aug 26, 2023

Do you want me to do a pull request ? My branch is intended as a quick fix. I think a more stable solution would be to use the correct module to make the requests.

@hrmck
Copy link

hrmck commented Apr 26, 2024

Not sure if it's helpful, but just set endpoints: [] if no endpoint is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants