shelleg / ansible-role-portainer

Ansible role for installing Portainer
MIT License
44 stars 30 forks source link

Warn has been removed from Ansible #21

Open SDAChess opened 1 year ago

SDAChess commented 1 year ago

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

Looks like @SDAChess fork fixed the issue:

https://github.com/shelleg/ansible-role-portainer/compare/master...SDAChess:ansible-role-portainer:master

Cannot create a pull request from repo @SDAChess.

SDAChess commented 1 year ago

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 commented 6 months ago

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