I have been playing around a bit with salt after I broke up with puppet and I must say I'm finding it a lot less frustrating. So far I have gotten to the stage where I can get most things working but I have reached an impasse that has me stumped.
The master and minions os are both Linux Mint 17.1 which uses the ubuntu trusty repository for 95% of its stuff.
I am trying to add a package which requires a launchpad ppa, specifically "Kodi" (formerly xbox media center / xbmc)
State: - pkgrepo
Name: kodi
Function: managed
Result: False
Comment: Failed to confirm config of repo 'kodi': repo 'kodi' was not found
OK, so the example given in the documentation is in the "base" section, so I put lines 2 and 3 in the base section of top.sls instead
This time there is no error but it doesn't actually do anything (there is no ppa file added to /etc/apt/sources.list.d)
The documentation also has some extra lines that relate to actually installing the package so I add those for completeness sake. My top.sls now looks like this:
base:
'*':
- common
pkgrepo.managed:
- ppa: team-xbmc/ppa
pkg.latest:
- name: kodi
- refresh: True
Again, no error, but nothing happens, no ppa, no kodi package is installed.
There is clearly something I am missing here.
So, I notice there is an alternate method of adding a ppa which involves creating a ppa file containing the url, specifying the key and key server etc. I decide to give that method a go:
This is what I added to my common.sls file:
kodi:
pkgrepo.managed:
- dist: trusty
- file: /etc/apt/sources.list.d/team-xbmc-ppa-trusty.list
- ppa: team-xbmc/ppa
- key: 91E7EE5E
- require_in:
- pkg: kodi
I got that data from the kodi website and also confirmed it another host that already had kodi installed.
When I push that change there are no errors and when I check for the ppa it has been added to sources.list.d. Yay
However when I run apt-get update on the minion I geet this error:
apt-get update
E: Type 'kodi' is not known on line 2 in source list /etc/apt/sources.list
E: The list of sources could not be read.
Hmmm, I edit the file and there is a single word "kodi" in there. Further experimentation revealed that this line was added during my attempts to get the first method to work. I removed that line and tried again.
This time it "worked" but had a gpg key error at the end.
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6D975C4791E7EE5E
For some reason it has not downloaded the key correctly. I have checked and double checked (kodi website and the manually configured working host) and the key is the correct one (caveat, see below).
If I do apt-key list on the working host it shows the key like this:
pub 1024R/91E7EE5E 2009-01-20
uid Launchpad PPA for XBMC for Linux
(This also corresponds to the key shown on the kodi website). Originally I had stripped the first part off but I added it back and tried again with the same result.
Also, I note that the key shown in the error is also a longer string so I put that in as well, same result.
I really can't figure out what I'm doing wrong. It seems like it should be pretty straight forward.
Any clues much appreciated.