Closed xtianae7 closed 2 years ago
Old server configuration files are not being removed.
Expected behavior: [What you expect to happen] Old servers removed after execution.
Actual behavior: [What actually happens] Old server does not get removed.
Reproduces how often: [What percentage of the time does it reproduce?] Always
[Any additional information, configuration or data that might be necessary to reproduce the issue.]
These lines should be removing the old servers https://github.com/idealista/nginx_role/blob/1bbab41ba130d78207bd36ef40693399982bdb3b/tasks/config.yml#L122-L150
Output of verbose mode of one of the tasks to remove servers:
TASK [nginx_role : NGINX | Remove old servers available] *********************** ok: [nginxtest] => (item=['web3', 'web2-ssl']) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "_diff_peek": null, "_original_basename": null, "access_time": null, "access_time_format": "%Y%m%d%H%M.%S", "attributes": null, "follow": true, "force": false, "group": null, "mode": null, "modification_time": null, "modification_time_format": "%Y%m%d%H%M.%S", "owner": null, "path": "/etc/nginx/sites-available/['web3', 'web2-ssl']", "recurse": false, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "absent", "unsafe_writes": false } }, "item": [ "web3", "web2-ssl" ], "path": "/etc/nginx/sites-available/['web3', 'web2-ssl']", "state": "absent" }
We can see that the task tries to remove ['web3', 'web2-ssl'] as a whole, this does not work as ansible identifies it as a String, trying to remove ['web3', 'web2-ssl] as if its a single file named that way.
['web3', 'web2-ssl]
Resolved with release 4.2.1
Description
Old server configuration files are not being removed.
Steps to Reproduce
Expected behavior: [What you expect to happen] Old servers removed after execution.
Actual behavior: [What actually happens] Old server does not get removed.
Reproduces how often: [What percentage of the time does it reproduce?] Always
Environment
Additional Information
[Any additional information, configuration or data that might be necessary to reproduce the issue.]
These lines should be removing the old servers https://github.com/idealista/nginx_role/blob/1bbab41ba130d78207bd36ef40693399982bdb3b/tasks/config.yml#L122-L150
Output of verbose mode of one of the tasks to remove servers:
We can see that the task tries to remove ['web3', 'web2-ssl'] as a whole, this does not work as ansible identifies it as a String, trying to remove
['web3', 'web2-ssl]
as if its a single file named that way.