I want to install facebook osquery with ansible. The instructions for ubuntu are as follows:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C9D8B80B
...
Unfortunately setting the id to C9D8B80B
doesn't work. In tasks:
- name: Add repository key
apt_key: keyserver=keyserver.ubuntu.com id=C9D8B80B state=present
The command fails:
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 is --recv C9D8B80B
vs --recv-keys C9D8B80B
.
Which ansible apt_key
option corresponds to --recv-keys
?
Nevermind, it was a sudo
issue. Presumably --recv
and --recv-key
and --recv-keys
are the same option.
The full stack trace is:
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
To fix added sudo: yes
to playbook.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With