diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-04-12 12:29:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-04-12 12:29:24 -0300 |
commit | 19a3a2cda8682e8b00f8c8962461cd8b4fef10d5 (patch) | |
tree | c018047e563e9b39018597186fc316cb2a97fb3e /manifests/ppa.pp | |
parent | 43017883c2d5533b083bfc0386f3fc064e80a65d (diff) | |
download | puppet-php-19a3a2cda8682e8b00f8c8962461cd8b4fef10d5.tar.gz puppet-php-19a3a2cda8682e8b00f8c8962461cd8b4fef10d5.tar.bz2 |
Refactor and add php-fpm support
Diffstat (limited to 'manifests/ppa.pp')
-rw-r--r-- | manifests/ppa.pp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/manifests/ppa.pp b/manifests/ppa.pp new file mode 100644 index 0000000..d78492a --- /dev/null +++ b/manifests/ppa.pp @@ -0,0 +1,37 @@ +class php::ppa { + #package { 'python-software-properties': + # ensure => present, + #} + + # 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', + # creates => '/etc/apt/sources.list.d/ondrej-ubuntu-php-xenial.list', + # 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, + } +} |