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:
To fix added
sudo: yes
to playbook.