Revision c0774f90
Added by Dustin Franklin over 9 years ago
manifests/install/repos/apt.pp | ||
---|---|---|
define foreman::install::repos::apt ($repo) {
|
||
file { "/etc/apt/sources.list.d/${name}.list":
|
||
content => "deb http://deb.theforeman.org/ ${::lsbdistcodename} ${repo}\ndeb http://deb.theforeman.org/ plugins ${repo}\n"
|
||
} ~>
|
||
} ->
|
||
exec { "foreman-key-${name}":
|
||
command => '/usr/bin/wget -q http://deb.theforeman.org/foreman.asc -O- | /usr/bin/apt-key add -',
|
||
refreshonly => true
|
||
command => '/usr/bin/wget -q http://deb.theforeman.org/foreman.asc -O- | /usr/bin/apt-key add -',
|
||
unless => '/usr/bin/apt-key list | /bin/grep -q "Foreman Automatic Signing Key"'
|
||
} ~>
|
||
exec { "update-apt-${name}":
|
||
command => '/usr/bin/apt-get update',
|
Also available in: Unified diff
Changed apt-key download from refresh-only to having an explicit unless check because if there is no internet access during the installation of the apt sources, then the key will never be added on subsequent puppet runs that do have internet access