No package matching 'gnupg2' is available
asfarley opened this issue · comments
I'm trying to use ansible-playbook to configure this role on my remote host, but I'm getting an errror:
TASK [geerlingguy.nodejs : Ensure dependencies are present.] *************************************************************************************************************************
fatal: [XXXXXXXXXX.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "No package matching 'gnupg2' is available"}
From Google, it seems that this happens if I have not updated apt packages. However, previously in my playbook, I've done this:
- name: Update all packages to the latest version
apt: {upgrade: dist}
Shouldn't this update any necessary packages?
Needed to add a repository before this role because I was using Ubuntu 18.04:
- name: Add universe repository for bionic
apt_repository:
repo: deb http://archive.ubuntu.com/ubuntu bionic universe
state: present
when: ansible_distribution_release == 'bionic'
How did you do that? I can't run a task before the role
Found it: pre_task