aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-01-16 17:40:27 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-01-16 17:40:27 -0200
commit43017883c2d5533b083bfc0386f3fc064e80a65d (patch)
tree8a78a72981525ab12e27100c47141f6f1e81781d
parente35a66651a263046ef2e0a0a4b5231a4a4d99d12 (diff)
downloadpuppet-php-43017883c2d5533b083bfc0386f3fc064e80a65d.tar.gz
puppet-php-43017883c2d5533b083bfc0386f3fc064e80a65d.tar.bz2
Handles OpenPGP key for ondrej_ubuntu repodevelop
-rw-r--r--files/ondrej_ubuntu_php.gpgbin0 -> 364 bytes
-rw-r--r--manifests/series5/packages/dpa.pp2
-rw-r--r--manifests/series5/packages/ppa.pp26
3 files changed, 26 insertions, 2 deletions
diff --git a/files/ondrej_ubuntu_php.gpg b/files/ondrej_ubuntu_php.gpg
new file mode 100644
index 0000000..04c5d9b
--- /dev/null
+++ b/files/ondrej_ubuntu_php.gpg
Binary files differ
diff --git a/manifests/series5/packages/dpa.pp b/manifests/series5/packages/dpa.pp
index bff8bd1..297c4a2 100644
--- a/manifests/series5/packages/dpa.pp
+++ b/manifests/series5/packages/dpa.pp
@@ -7,7 +7,7 @@ class php::series5::packages::dpa {
source => 'puppet:///modules/php/deb.sury.org.gpg',
}
- file { '/etc/apt/sources.list.d/php.list' :
+ file { '/etc/apt/sources.list.d/php.list':
ensure => present,
owner => "root",
group => "root",
diff --git a/manifests/series5/packages/ppa.pp b/manifests/series5/packages/ppa.pp
index 10c5b56..e420822 100644
--- a/manifests/series5/packages/ppa.pp
+++ b/manifests/series5/packages/ppa.pp
@@ -3,7 +3,7 @@ class php::series5::packages::ppa {
# ensure => present,
#}
- ## TODO: check repository key!
+ # This required alternative checking of repository key!
#exec { 'add-apt-repository-ondrej-php':
# command => '/usr/bin/add-apt-repository -y ppa:ondrej/php && apt-get update',
# user => 'root',
@@ -11,6 +11,30 @@ class php::series5::packages::ppa {
# require => Package['python-software-properties'],
#}
+ file { '/etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg':
+ ensure => present,
+ owner => "root",
+ group => "root",
+ mode => "0644",
+ source => 'puppet:///modules/php/ondrej_ubuntu_php.gpg',
+ }
+
+ file { '/etc/apt/sources.list.d/php.list':
+ ensure => present,
+ owner => "root",
+ group => "root",
+ mode => "0644",
+ content => "deb http://ppa.launchpad.net/ondrej/php/ubuntu ${::lsbdistcodename} main\n",
+ require => File['/etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg'],
+ notify => Exec['php-apt-auto-update'],
+ }
+
+ exec { 'php-apt-auto-update':
+ command => "/usr/bin/apt-get update",
+ user => "root",
+ refreshonly => true,
+ }
+
# The needed packages: we could also try libapache2-mod-php5.6filter
package { 'php5':
name => 'php5.6',