Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Commit

Permalink
Merge pull request #86 from nicolasbrechet/feature_oauth
Browse files Browse the repository at this point in the history
Added extension oauth
  • Loading branch information
jippi committed Sep 25, 2016
2 parents b23307f + fa9b3a4 commit 60b1447
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ Class name: ``php::extension::newrelic``.

* ``$inifile`` defaults to ``${php::params::config_root_ini}/newrelic.ini``

oauth
-----

Class name: ``php::extension::oauth``.

* ``$package`` defaults to ``php5-oauth``

* ``$inifile`` defaults to ``${php::params::config_root_ini}/oauth.ini``

opcache
-------

Expand Down
60 changes: 60 additions & 0 deletions manifests/extension/oauth.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# == Class: php::extension::oauth
#
# Install and configure the oauth PHP extension
#
# === Parameters
#
# [*ensure*]
# The version of the package to install
# Could be "latest", "installed" or a pinned version
# This matches "ensure" from Package
#
# [*package*]
# The package name in your provider
#
# [*provider*]
# The provider used to install the package
#
# [*inifile*]
# The path to the extension ini file
#
# [*settings*]
# Hash with 'set' nested hash of key => value
# set changes to agues when applied to *inifile*
#
# === Variables
#
# No variables
#
# === Examples
#
# include php::extension::oauth
#
# === Authors
#
# Christian "Jippi" Winther <jippignu@gmail.com>
#
# === Copyright
#
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
#
class php::extension::oauth(
$ensure = $php::extension::oauth::params::ensure,
$package = $php::extension::oauth::params::package,
$provider = $php::extension::oauth::params::provider,
$inifile = $php::extension::oauth::params::inifile,
$settings = $php::extension::oauth::params::settings,
) inherits php::extension::oauth::params {

php::extension { 'oauth':
ensure => $ensure,
package => $package,
provider => $provider
}

php::config { 'php-extension-oauth':
file => $inifile,
config => $settings
}

}
49 changes: 49 additions & 0 deletions manifests/extension/oauth/params.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# == Class: php::extension::oauth::params
#
# Defaults file for the oauth PHP extension
#
# === Parameters
#
# No parameters
#
# === Variables
#
# [*ensure*]
# The version of the package to install
# Could be "latest", "installed" or a pinned version
# This matches "ensure" from Package
#
# [*package*]
# The package name in your provider
#
# [*provider*]
# The provider used to install the package
#
# [*inifile*]
# The path to the extension ini file
#
# [*settings*]
# Hash with 'set' nested hash of key => value
# set changes to agues when applied to *inifile*
#
# === Examples
#
# No examples
#
# === Authors
#
# Christian "Jippi" Winther <jippignu@gmail.com>
#
# === Copyright
#
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
#
class php::extension::oauth::params {

$ensure = $php::params::ensure
$package = 'php5-oauth'
$provider = undef
$inifile = "${php::params::config_root_ini}/oauth.ini"
$settings = [ ]

}

0 comments on commit 60b1447

Please sign in to comment.