apt_key with ubuntu trusty

97 views
Skip to first unread message

Rogelio Morrell

unread,
Feb 2, 2015, 1:29:36 PM2/2/15
to ansible...@googlegroups.com
Hi,

Using Ansible 1.6.6 and a Linux Mint 16, which tries to provision an Ubuntu trusty image, I get apt_key error

 ______________________________
< TASK: mono | Get Xamarin GPG >
 ------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


failed: [default] => {"failed": true, "id": "3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"}
msg: key does not seem to have been added

FATAL: all hosts have already failed -- aborting
 ____________
< PLAY RECAP >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


           to retry, use: --limit @/home/rogelio/playbook.retry

default                    : ok=3    changed=0    unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.


Found this issue in github that might be related

Here is the task

---
- name: Get Xamarin GPG
# Add an apt key by id from a keyserver
  apt_key: keyserver=keyserver.ubuntu.com id=3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF state=present

Any idea how to fix ? 

Thanks,
Rogelio

Giovanni Tirloni

unread,
Feb 2, 2015, 1:56:03 PM2/2/15
to ansible...@googlegroups.com
On Mon, 02 Feb 2015 10:29 -0800, Rogelio Morrell <mole...@gmail.com>
wrote:
> failed: [default] => {"failed": true, "id":
> "3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"}
> msg: key does not seem to have been added

[...]

> - name: Get Xamarin GPG
> # Add an apt key by id from a keyserver
> apt_key: keyserver=keyserver.ubuntu.com
> id=3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF state=present

Checking the apt_key code, it seems the function that imports the key
always return True [1]... but I suspect the apt-key command might be
failing.

Does it work if you try to import the key manually?

apt-key adv --keyserver keyserver.ubuntu.com --recv
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

[1]
https://github.com/ansible/ansible-modules-core/blob/devel/packaging/os/apt_key.py
Reply all
Reply to author
Forward
0 new messages