Error saying "Failed to find required executable gpg in paths"

0 votes

I have a role to install Docker. 

   - name: Install Docker and role dependencies
    name: "{{ item }}"
    state: "present"
    install_recommends: False
    - "apt-transport-https"
    - "ca-certificates"
    - "software-properties-common"
    - "cron"

- name: Get upstream APT GPG key
    id: "{{ docker_apt_key }}"
    keyserver: "{{ ansible_local.core.keyserver
                   if (ansible_local|d() and ansible_local.core|d() and
                   else 'hkp://' }}"
    state: "present"

- name: Configure upstream APT repository
    repo: "{{ docker_repository }}"
    state: "present"
    update_cache: True

- name: Install Docker
    name: "docker-{{ docker_edition }}={{ docker_apt_package_name }}"
    state: "present"
    update_cache: True
    install_recommends: False
    cache_valid_time: "{{ docker_apt_cache_time }}"

But I get stuck with this error:

TASK [nickjj.docker : Install Docker and role dependencies] ************************************************************************************************************************************************
ok: [] => (item=[u'apt-transport-https', u'ca-certificates', u'software-properties-common', u'cron'])

TASK [nickjj.docker : Get upstream APT GPG key] ************************************************************************************************************************************************************
fatal: []: FAILED! => {"changed": false, "msg": "Failed to find required executable gpg in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"}
    to retry, use: --limit @/home/skaouech/work/ansible/plays.retry
Mar 13 in Ansible by Nisha

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Hey @Nisha, according to your error, your target host does not seem to have the gpg binary. install it using the apt package. Install gnupg using the apt package.

Hope that helps :)
answered Mar 13 by Yesha

Related Questions In Ansible

0 votes
1 answer

Error saying "Failed to find required executable npm in paths"

Hey @Thomas,  Seems like those extra paths have ...READ MORE

answered Jan 10 in Ansible by Naina
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.