-
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6eeb0b0
commit fcf3f4c
Showing
5 changed files
with
55 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
--- | ||
--- | ||
php::external_repo: false | ||
php::php_version: '7.3' | ||
php::os_supported_php_versions: | ||
- '7.3' | ||
|
||
php::external_repo_supported_php_versions: | ||
- '5.6' | ||
- '7.0' | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
- '7.4' | ||
|
||
php::external_repo_details: | ||
'source_php_sury': | ||
comment: 'the debian sury repo sury.org' | ||
location: 'https://packages.sury.org/php/' | ||
repos: 'main' | ||
include: | ||
src: true | ||
deb: true | ||
key: | ||
id: '15058500A0235D97F5D10063B188E2B695BD4743' | ||
source: 'https://packages.sury.org/php/apt.gpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,15 @@ | ||
# Configure package repository | ||
# | ||
class php::repo { | ||
$msg_no_repo = "No repo available for ${facts['os']['family']}/${facts['os']['name']}" | ||
|
||
case $facts['os']['family'] { | ||
'Debian': { | ||
# no contain here because apt does that already | ||
case $facts['os']['name'] { | ||
'Debian': { | ||
include php::repo::debian | ||
} | ||
'Ubuntu': { | ||
include php::repo::ubuntu | ||
} | ||
default: { | ||
fail($msg_no_repo) | ||
} | ||
} | ||
} | ||
'FreeBSD': {} | ||
'Suse': { | ||
contain php::repo::suse | ||
} | ||
'RedHat': { | ||
contain 'php::repo::redhat' | ||
} | ||
default: { | ||
fail($msg_no_repo) | ||
} | ||
class php::repo ( | ||
Boolean $external_repo = $php::external_repo, | ||
Optional[String[1]] $php_version = $php::php_version, | ||
Optional[Array] $external_repo_supported_php_versions = $php::external_repo_supported_php_versions, | ||
) { | ||
if ($external_repo and $php_version in $external_repo_supported_php_versions) { | ||
case $facts['os']['name'] { | ||
'RedHat', 'CentOS': { contain '::php::repo::redhat' } | ||
'Debian', 'Ubuntu': { contain '::php::repo::debian' } | ||
default: { contain '::php::repo::fallback' } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class php::repo::fallback () { | ||
assert_private() | ||
|
||
$msg_no_repo = "No repo available for ${facts['os']['family']}/${facts['os']['name']}" | ||
fail($msg_no_repo) | ||
} |