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
sudoissue. Presumably--recvand--recv-keyand--recv-keysare the same option.The full stack trace is:
To fix added
sudo: yesto playbook.