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
  apt:
    name: "{{ item }}"
    state: "present"
    install_recommends: False
  with_items:
    - "apt-transport-https"
    - "ca-certificates"
    - "software-properties-common"
    - "cron"

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

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

- name: Install Docker
  apt:
    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: [127.0.0.1] => (item=[u'apt-transport-https', u'ca-certificates', u'software-properties-common', u'cron'])

TASK [nickjj.docker : Get upstream APT GPG key] ************************************************************************************************************************************************************
fatal: [127.0.0.1]: 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, 2019 in Ansible by Nisha
11,134 views

1 answer to this question.

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, 2019 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, 2019 in Ansible by Naina
2,905 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP