jgeusebroek / ansible-role-maxmind-geoip

An Ansible Role that installs and configures the Maxmind GeoIP databases
4 stars 9 forks source link

Role failed at task "Add Maxmind PPA repository | Ubuntu" when `become` is set to False #7

Open brlin-tw opened 3 years ago

brlin-tw commented 3 years ago
TASK [jgeusebroek.maxmind_geoip : Add Maxmind PPA repository | Ubuntu] **********************************************************************
fatal: [default]: FAILED! => {
    "changed": false,
    "cmd": "apt-key adv --recv-keys --no-tty --keyserver hkp://keyserver.ubuntu.com:80 F44B38CE3DB1BF64B61DBD28DE1997DCDE742AFA",
    "rc": 1
}

STDOUT:

Executing: /tmp/apt-key-gpghome.X6HlupWgOJ/gpg.1.sh --recv-keys --no-tty --keyserver hkp://keyserver.ubuntu.com:80 F44B38CE3DB1BF64B61DBD28DE1997DCDE742AFA

STDERR:

Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: key DE1997DCDE742AFA: public key "Launchpad PPA for MaxMind" imported
gpg: Total number processed: 1
gpg:               imported: 1
/usr/bin/apt-key: 402: cannot create /etc/apt/trusted.gpg: Permission denied
cat: /tmp/apt-key-gpghome.X6HlupWgOJ/gpgoutput.log: No such file or directory

One should not assume that the role consumers always set become: True, consider specifying become: True for all the tasks that require superuser privileges.