aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-09-14 14:45:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-09-14 14:45:46 -0300
commita393864ac0554b671f6e5d04def839d76c90032c (patch)
tree1608b1e90614f7480c95dd2e47fbe15830a28808 /manifests
parent0c815b656e93e18f7fb6b72c0be4e51069799abe (diff)
downloadpuppet-php-a393864ac0554b671f6e5d04def839d76c90032c.tar.gz
puppet-php-a393864ac0554b671f6e5d04def839d76c90032c.tar.bz2
Avoid dependency lookup error for /etc/apt/sources.list.d/php.list at php::packages (3)
Diffstat (limited to 'manifests')
-rw-r--r--manifests/dpa.pp15
-rw-r--r--manifests/packages.pp2
-rw-r--r--manifests/ppa.pp15
-rw-r--r--manifests/repository.pp15
-rw-r--r--manifests/series7/packages.pp6
5 files changed, 24 insertions, 29 deletions
diff --git a/manifests/dpa.pp b/manifests/dpa.pp
index 619cd0a..74ba174 100644
--- a/manifests/dpa.pp
+++ b/manifests/dpa.pp
@@ -1,4 +1,4 @@
-class php::dpa inherits php::packages {
+class php::dpa inherits php::repository {
file { '/etc/apt/trusted.gpg.d/deb.sury.org-php.gpg':
ensure => present,
owner => "root",
@@ -7,19 +7,8 @@ class php::dpa inherits php::packages {
source => 'puppet:///modules/php/deb.sury.org.gpg',
}
- file { '/etc/apt/sources.list.d/php.list':
- ensure => present,
- owner => "root",
- group => "root",
- mode => "0644",
+ File['/etc/apt/sources.list.d/php.list'] {
content => "deb https://packages.sury.org/php/ ${::lsbdistcodename} main\n",
require => File['/etc/apt/trusted.gpg.d/deb.sury.org-php.gpg'],
- notify => Exec['php-apt-auto-update'],
- }
-
- exec { 'php-apt-auto-update':
- command => "/usr/bin/apt-get update",
- user => "root",
- refreshonly => true,
}
}
diff --git a/manifests/packages.pp b/manifests/packages.pp
index 0ea9292..305f61f 100644
--- a/manifests/packages.pp
+++ b/manifests/packages.pp
@@ -1,4 +1,4 @@
-class php::packages {
+class php::packages inherits php::repository {
package { [ 'php', 'php-imagick', 'php-mysql', 'php-sqlite3', 'php-gd', 'php-curl' ]:
ensure => installed,
require => File['/etc/apt/sources.list.d/php.list'],
diff --git a/manifests/ppa.pp b/manifests/ppa.pp
index 591844c..2367bf9 100644
--- a/manifests/ppa.pp
+++ b/manifests/ppa.pp
@@ -1,4 +1,4 @@
-class php::ppa inherits php::packages {
+class php::ppa inherits php::repository {
#package { 'python-software-properties':
# ensure => present,
#}
@@ -20,19 +20,8 @@ class php::ppa inherits php::packages {
notify => Exec['php-apt-auto-update'],
}
- file { '/etc/apt/sources.list.d/php.list':
- ensure => present,
- owner => "root",
- group => "root",
- mode => "0644",
+ File['/etc/apt/sources.list.d/php.list'] {
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,
}
}
diff --git a/manifests/repository.pp b/manifests/repository.pp
new file mode 100644
index 0000000..01b4dbf
--- /dev/null
+++ b/manifests/repository.pp
@@ -0,0 +1,15 @@
+class php::repository {
+ file { '/etc/apt/sources.list.d/php.list':
+ ensure => present,
+ owner => "root",
+ group => "root",
+ mode => "0644",
+ notify => Exec['php-apt-auto-update'],
+ }
+
+ exec { 'php-apt-auto-update':
+ command => "/usr/bin/apt-get update",
+ user => "root",
+ refreshonly => true,
+ }
+}
diff --git a/manifests/series7/packages.pp b/manifests/series7/packages.pp
index 1f1d635..15a91c3 100644
--- a/manifests/series7/packages.pp
+++ b/manifests/series7/packages.pp
@@ -2,12 +2,14 @@ class php::series7::packages inherits php::packages {
$version = $::php::params::version7
package { [ "php${version}-common", "php${version}-mysql", "php${version}-cli", "php${version}-curl", 'php-gmp', 'php-xml', "libapache2-mod-php${version}" ]:
- ensure => installed,
+ rnsure => installed,
+ require => File['/etc/apt/sources.list.d/php.list'],
}
# Optional packages
package { [ "php${version}-gd" ]:
- ensure => installed,
+ ensure => installed,
+ require => File['/etc/apt/sources.list.d/php.list'],
}
# Default alternative