Discussion:
Helping adding gpgkey for custom repos
Stephen Wood
2013-11-23 00:35:26 UTC
Permalink
I'm attempting to add this repo<http://hwraid.le-vert.net/wiki/DebianPackages>,
but the installation is failing because the gpg key is not adding and the
install refuses to use --force-yes.

My sls file looks like this:

{% set release = grains['oscodename'] %}
stalstack_repo:
pkgrepo.managed:
- humanname: Megaraid Controller Packages
- name: deb http://hwraid.le-vert.net/ubuntu {{ release }} main
- file: /etc/apt/sources.list.d/megaraidcli.list
- gpgcheck: 1
- gpgkey: salt://modules/megaraidcli/gpg.key


lsi_raid_packages:
pkg.latest:
- pkgs:
- megacli
- megaclisas-status
- megactl
- megaide-spyd
- megamgr
- megaraid-status

I've verified that I have the correct version of gpg.key, but it doesn't
work. I need to add the key manually first with cmd.run:

add_lsi_gpg_key:
cmd.run:
- name: wget -O -
http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key
add -

Any ideas if I'm just doing this wrong?
--
Stephen Wood
www.heystephenwood.com
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Stephen Wood
2013-11-23 01:31:06 UTC
Permalink
Here's the solution for properly adding the gpg key for the debian/ubuntu
packages in case someone else stumbles into this email.

We used apt-key list to find the hex value for the key and then plugged it
into this sls recipe:

megaraid_repo:
pkgrepo.managed:
- humanname: Megaraid repo
- name: deb http://hwraid.le-vert.net/ubuntu {{ grains['oscodename'] }}
main
- file: /etc/apt/sources.list.d/megaraidcli.list
- require:
- cmd: megaraid_repo
cmd.run:
- name: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
23B3D3B4
- unless: apt-key list | grep 23B3D3B4

megaraid_tools:
pkg.latest:
- pkgs:
- megacli
- megaclisas-status
- megactl
- megamgr
- megaraid-status
Post by Stephen Wood
I'm attempting to add this repo<http://hwraid.le-vert.net/wiki/DebianPackages>,
but the installation is failing because the gpg key is not adding and the
install refuses to use --force-yes.
{% set release = grains['oscodename'] %}
- humanname: Megaraid Controller Packages
- name: deb http://hwraid.le-vert.net/ubuntu {{ release }} main
- file: /etc/apt/sources.list.d/megaraidcli.list
- gpgcheck: 1
- gpgkey: salt://modules/megaraidcli/gpg.key
- megacli
- megaclisas-status
- megactl
- megaide-spyd
- megamgr
- megaraid-status
I've verified that I have the correct version of gpg.key, but it doesn't
- name: wget -O -
http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo
apt-key add -
Any ideas if I'm just doing this wrong?
--
Stephen Wood
www.heystephenwood.com
--
Stephen Wood
www.heystephenwood.com
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Ming Fang
2013-11-23 01:35:30 UTC
Permalink
I was also able to use the keyid and keyserver property of pkgrepo.
Here is any example

salt_repo:
pkgrepo.managed:
- repo: 'deb http://ppa.launchpad.net/saltstack/salt/ubuntu precise main'
- file: '/etc/apt/sources.list.d/salt.list'
- keyid: 0E27C0A6
- keyserver: keyserver.ubuntu.com
- require_in:
- pkg: salt-minion
Here's the solution for properly adding the gpg key for the debian/ubuntu packages in case someone else stumbles into this email.
- humanname: Megaraid repo
- name: deb http://hwraid.le-vert.net/ubuntu {{ grains['oscodename'] }} main
- file: /etc/apt/sources.list.d/megaraidcli.list
- cmd: megaraid_repo
- name: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23B3D3B4
- unless: apt-key list | grep 23B3D3B4
- megacli
- megaclisas-status
- megactl
- megamgr
- megaraid-status
I'm attempting to add this repo, but the installation is failing because the gpg key is not adding and the install refuses to use --force-yes.
{% set release = grains['oscodename'] %}
- humanname: Megaraid Controller Packages
- name: deb http://hwraid.le-vert.net/ubuntu {{ release }} main
- file: /etc/apt/sources.list.d/megaraidcli.list
- gpgcheck: 1
- gpgkey: salt://modules/megaraidcli/gpg.key
- megacli
- megaclisas-status
- megactl
- megaide-spyd
- megamgr
- megaraid-status
- name: wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
Any ideas if I'm just doing this wrong?
--
Stephen Wood
www.heystephenwood.com
--
Stephen Wood
www.heystephenwood.com
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...