Skip to content

Commit 7e2b482

Browse files
committed
Update PHP package source
1 parent b5a3e8a commit 7e2b482

File tree

4 files changed

+39
-23
lines changed

4 files changed

+39
-23
lines changed

Vagrantfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ VAGRANTFILE_API_VERSION = "2"
77
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
88

99
# Every Vagrant virtual environment requires a box to build off of.
10-
config.vm.box = "jissues-debian-jessie64"
10+
config.vm.box = "jissues-debian-jessie64-v2"
1111

1212
# The url from where the 'config.vm.box' box will be fetched if it
1313
# doesn't already exist on the user's system.
14-
config.vm.box_url = "https://atlas.hashicorp.com/debian/boxes/contrib-jessie64/versions/8.7.0/providers/virtualbox.box"
14+
config.vm.box_url = "https://atlas.hashicorp.com/debian/boxes/contrib-jessie64/versions/8.8.0/providers/virtualbox.box"
1515

1616
# Create a forwarded port mapping which allows access to a specific port
1717
# within the machine from a port on the host machine. In the example below,

build/puppet/files/etc/dotdeb.list

-2
This file was deleted.

build/puppet/files/etc/suryphp.list

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deb https://packages.sury.org/php jessie main

build/puppet/manifests/default.pp

+36-19
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
path => '/usr/bin',
77
}
88

9+
include https
10+
11+
class https {
12+
package { ['apt-transport-https']:
13+
ensure => installed,
14+
}
15+
}
16+
917
include jissues
1018

1119
class jissues {
@@ -33,23 +41,23 @@
3341
}
3442
}
3543

36-
include dotdeb
44+
include suryphp
3745

38-
class dotdeb {
39-
exec { 'get-dotdeb':
40-
command => 'wget https://www.dotdeb.org/dotdeb.gpg && apt-key add dotdeb.gpg'
46+
class suryphp {
47+
exec { 'get-suryphp':
48+
command => 'wget -O /etc/apt/trusted.gpg.d/suryphp.gpg https://packages.sury.org/php/apt.gpg'
4149
}
4250

43-
file { '/etc/apt/sources.list.d/dotdeb.list':
51+
file { '/etc/apt/sources.list.d/suryphp.list':
4452
ensure => present,
45-
source => '/vagrant/build/puppet/files/etc/dotdeb.list',
53+
source => '/vagrant/build/puppet/files/etc/suryphp.list',
4654
owner => 'root',
4755
group => 'root';
4856
}
4957

5058
exec { 'update-cache':
5159
command => 'aptitude update',
52-
require => File['/etc/apt/sources.list.d/dotdeb.list']
60+
require => File['/etc/apt/sources.list.d/suryphp.list']
5361
}
5462
}
5563

@@ -105,26 +113,35 @@
105113

106114
class php {
107115
package { [
108-
'php7.0',
109-
'php7.0-mysql',
110-
'php7.0-curl',
111-
'php7.0-xdebug',
112-
'php7.0-cli',
113-
'php7.0-intl'
116+
'php7.1',
117+
'php7.1-mysql',
118+
'php7.1-curl',
119+
'php7.1-xdebug',
120+
'php7.1-cli',
121+
'php7.1-intl'
114122
]:
115123
ensure => installed,
116124
require => Exec[update-cache]
117125
}
118126

119-
file { '/etc/php/7.0/apache2/conf.d/98-xdebug.ini':
127+
file { '/etc/php/7.1/apache2/conf.d/10-mysqli.ini':
128+
ensure => 'link',
129+
require => Package['php7.1'],
130+
target => '/etc/php/7.1/mods-available/mysqli.ini',
131+
before => Service['apache2'],
132+
}
133+
134+
file { '/etc/php/7.1/apache2/conf.d/98-xdebug.ini':
120135
ensure => present,
121-
require => Package['php7.0'],
122-
source => '/vagrant/build/puppet/files/php/xdebug.ini';
136+
require => Package['php7.1'],
137+
source => '/vagrant/build/puppet/files/php/xdebug.ini',
138+
before => Service['apache2'],
123139
}
124140

125-
file { '/etc/php/7.0/apache2/conf.d/99-php.ini':
141+
file { '/etc/php/7.1/apache2/conf.d/99-php.ini':
126142
ensure => present,
127-
require => Package['php7.0'],
128-
source => '/vagrant/build/puppet/files/php/php.ini';
143+
require => Package['php7.1'],
144+
source => '/vagrant/build/puppet/files/php/php.ini',
145+
before => Service['apache2'],
129146
}
130147
}

0 commit comments

Comments
 (0)