ansible-collections / ansible-consul

:satellite: Ansible role for Hashicorp Consul clusters

Home Page:https://galaxy.ansible.com/ansible-community/consul/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to find required 'zipinfo' binary in the path.

patsevanton opened this issue · comments

Hello! Thanks for role consul.

Get error

TASK [ansible-consul : Check if unzip is installed on control host] **********************************************************************************************
Monday 09 May 2022  08:58:20 +0600 (0:00:00.071)       0:00:35.809 ************ 
fatal: [consul0 -> 127.0.0.1]: FAILED! => changed=false 
  cmd: command -v unzip -h >/dev/null 2>&1
  delta: '0:00:00.035367'
  end: '2022-05-09 08:58:20.590777'
  msg: non-zero return code
  rc: 127
  start: '2022-05-09 08:58:20.555410'
  stderr: ''
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
...ignoring



TASK [ansible-consul : Unarchive Consul package] *****************************************************************************************************************
Monday 09 May 2022  08:59:13 +0600 (0:00:00.227)       0:01:29.008 ************ 
fatal: [consul0 -> 127.0.0.1]: FAILED! => changed=false 
  msg: Failed to find handler for "/home/user/.ansible/tmp/ansible-tmp-1652065153.5919049-17618-176719116815983/source". Make sure the required command to extract the file is installed. Command "/usr/bin/tar" could not handle archive. Unable to find required 'unzip' or 'zipinfo' binary in the path.

Playbook

---
- hosts: consul_instances
  become: true
  pre_tasks:
    - name: Update apt cache.
      apt: update_cache=true cache_valid_time=600
      when: ansible_os_family == 'Debian'
  roles:
    - role: ansible-consul

Inventory

all:
  children:
    consul_instances:
      hosts:
        consul0:
          ansible_host: xxx
        consul1:
          ansible_host: xxx
        consul2:
          ansible_host: xxx

Environment

  • Control node OS: (cat /etc/os-release)
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
  • Control node Ansible version: (ansible --version)
ansible [core 2.12.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
  • Managed node OS: (cat /etc/os-release)
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"

FIxed by install unzip on Control node OS.

Should the playbook abort the installation in the task "Check if unzip is installed on the management host"?