opensearch-project / ansible-playbook

🤖 A community repository for Ansible Playbook of OpenSearch Project.
https://opensearch.org/
Apache License 2.0
81 stars 97 forks source link

[BUG][roles/centos7/opensearch/tasks/security.yml] #24

Closed esencia closed 2 years ago

esencia commented 2 years ago

Describe the bug In security.yml playbook, the extract command is based on tar but the file is 'zip'.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior In task: "Security Plugin Configuration | Extract the certificates generation tool" the command uses tar to unzip file, but tar can't do that. Use 'unzip' command or 'unarchive' ansible module.

Playbook Name security.yml inside: roles/centos7/opensearch/tasks.

Screenshots

TASK [centos7/opensearch : Security Plugin configuration | Extract the certificates generation tool] *****************************************************[WARNING]: Consider using the unarchive module rather than running 'tar'.  If you need to use command because unarchive is insufficient you can add
'warn: false' to this command task or set 'command_warnings=False' in ansible.cfg to get rid of this message.
fatal: [os1]: FAILED! => {"changed": true, "cmd": ["tar", "-xvf", "search-guard-tlstool.zip"], "delta": "0:00:00.009987", "end": "2021-12-13 08:54:04.439241", "msg": "non-zero return code", "rc": 2, "start": "2021-12-13 08:54:04.429254", "stderr": "tar: Esto no parece un archivo tar\ntar: Saltando a la siguiente cabecera\ntar: Se sale con estado de fallo debido a errores anteriores", "stderr_lines": ["tar: Esto no parece un archivo tar", "tar: Saltando a la siguiente cabecera", "tar: Se sale con estado de fallo debido a errores anteriores"], "stdout": "", "stdout_lines": []}

Host/Environment (please complete the following information):

Additional context

peterzhuamazon commented 2 years ago

@saravanan30erd any comments to help @esencia with this issue? Thanks.

saravanan30erd commented 2 years ago

It seems the issue with unarchive for linux client machines, it works properly in MacOS though. I will change it to support all.