diff options
Diffstat (limited to 'manifests/ppa.pp')
-rw-r--r-- | manifests/ppa.pp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 07b96fa..70beec7 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -1,4 +1,12 @@ -class php::ppa inherits php::repository { +class php::ppa( + $ensure = 'present', +) { + class { 'php::repository': + ensure => $ensure, + content => "deb [signed-by=/etc/apt/keyrings/ondrej_ubuntu_php.gpg] http://ppa.launchpad.net/ondrej/php/ubuntu ${::lsbdistcodename} main\n", + dependencies => File['/etc/apt/keyrings/ondrej_ubuntu_php.gpg'], + } + #package { 'python-software-properties': # ensure => present, #} @@ -13,7 +21,7 @@ class php::ppa inherits php::repository { # Old location file { '/etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg': - ensure => present, + ensure => absent, owner => "root", group => "root", mode => "0644", @@ -22,16 +30,11 @@ class php::ppa inherits php::repository { } file { '/etc/apt/keyrings/ondrej_ubuntu_php.gpg': - ensure => present, + ensure => $ensure, owner => "root", group => "root", mode => "0644", source => 'puppet:///modules/php/ondrej_ubuntu_php.gpg', notify => Exec['php-apt-auto-update'], } - - File['/etc/apt/sources.list.d/php.list'] { - content => "deb [signed-by=/etc/apt/keyrings/ondrej_ubuntu_php.gpg] http://ppa.launchpad.net/ondrej/php/ubuntu ${::lsbdistcodename} main\n", - require => File['/etc/apt/keyrings/ondrej_ubuntu_php.gpg'], - } } |