How to add apt key with -recv instead of -recv?

I want to install facebook osquery with the option. The instructions for ubuntu are as follows:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C9D8B80B
...

Unfortunately setting id on C9D8B80Bdoes not work. In tasks:

- name: Add repository key
  apt_key: keyserver=keyserver.ubuntu.com id=C9D8B80B state=present

Team Failure:

TASK: [osquery | Add repository key] ****************************************** 
failed: [x.x.x.x] => {"cmd": "apt-key adv --keyserver keyserver.ubuntu.com --recv C9D8B80B", "failed": true, "rc": 2}

The difference - --recv C9D8B80Bvs --recv-keys C9D8B80B.

Which option apt_keymatches --recv-keys?

+4
source share
1 answer

Nevermind, it was a problem sudo. Presumably --recv, and --recv-keyand --recv-keysare the same.

Full stack trace:

stderr: gpg: requesting key C9D8B80B from hkp server keyserver.ubuntu.com
gpg: no writable keyring found: eof
gpg: error reading `[stream]': general error
gpg: Total number processed: 0

Fix added sudo: yesto playbook.

+4
source

All Articles