openwisp / ansible-openwisp2

Ansible role that installs and upgrades OpenWISP.
https://openwisp.io/docs/dev/ansible/
BSD 3-Clause "New" or "Revised" License
474 stars 137 forks source link

Unable to complete deployment from ansible #425

Closed doucettom closed 1 year ago

doucettom commented 1 year ago

Following from: https://github.com/openwisp/ansible-openwisp2/issues/422 fatal: [1001lab-openwisp-01]: FAILED! => { "changed": false, "invocation": { "module_args": { "insertafter": " # index-version = \"inmem\"", "line": " index-version = \"inmem\"", "path": "/etc/influxdb/influxdb.conf", "search_string": " index-version =" } }, "msg": "Unsupported parameters for (lineinfile) module: search_string Supported parameters include: attributes, backrefs, backup, create, firstmatch, group, insertafter, insertbefore, line, mode, owner, path, regexp, selevel, serole, setype, seuser, state, unsafe_writes, validate" }

nemesifier commented 1 year ago

Please read here: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html#parameter-search_string

added in ansible-core 2.11.

Make sure your ansible version is 2.11 or higher.

doucettom commented 1 year ago

With 2.14 from PPA:

fatal: [1001lab-openwisp-01]: FAILED! => { "changed": false, "invocation": { "module_args": { "_raw_params": "openssl req -new -nodes -x509 -subj \"/C=US/ST=California \ /L=San Francisco/O=IT dep. \\n /CN=1001lab-openwisp-01\" -days 3650 -keyout /opt/openwisp2/ssl/server.key -out /opt/openwisp2/ssl/server.crt -extensions v3_ca", "_uses_shell": false, "argv": null, "chdir": null, "creates": "/opt/openwisp2/ssl/server.crt", "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": false } }, "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." }

PLAY RECAP ***** 1001lab-openwisp-01 : ok=106 changed=9 unreachable=0 failed=1 skipped=61 rescued=0 ignored=0

nemesifier commented 1 year ago

https://github.com/openwisp/ansible-openwisp2/commit/d73f819021ff78a55806edd3d7cebdd4f691b348