Failed to find required executable "apt-key" in paths

Hi, all.

ansible --version
ansible [core 2.18.9]

Trellis provision on new DO Droplet.

Task: Add an Apt signing key, uses whichever key is at the URL

error

File "/tmp/ansible_ansible.builtin.apt_key_payload_0mvcy6sp/ansible_ansible.builtin.apt_key_payload.zip/ansible/module_utils/basic.py", line 1365, in get_bin_path
    bin_path = get_bin_path(arg=arg, opt_dirs=opt_dirs)
  File "/tmp/ansible_ansible.builtin.apt_key_payload_0mvcy6sp/ansible_ansible.builtin.apt_key_payload.zip/ansible/module_utils/common/process.py", line 64, in get_bin_path
    raise ValueError('Failed to find required executable "%s" in paths: %s' % (arg, os.pathsep.join(paths)))
fatal: [IP ADDRESS]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "data": null,
            "file": null,
            "id": null,
            "keyring": null,
            "keyserver": null,
            "state": "present",
            "url": "https://mariadb.org/mariadb_release_signing_key.asc",
            "validate_certs": true
        }
    },
    "msg": "Failed to find required executable \"apt-key\" in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
}

I can manually download it and it looks like a valid key. Not sure where I would save it on the

Been seeing posts re: apt-key is deprecated.

What version of Trellis? What version of Ubuntu?

Oh yes, sorry @ben meant to come back to this. The issue was because I had selected a non-LTS OS in the droplet creation.

Got caught up in aws-cli ansible updates, as it doesn’t seem to exist currently as a pip package and requires zip file download. Evaluating this ansible role from boutetnico.

No worries, I noticed the other day that DO defaults their new droplet Ubuntu version to a non-LTS.. kinda strange

1 Like