diff options
Diffstat (limited to 'manifests/dpa.pp')
-rw-r--r-- | manifests/dpa.pp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/manifests/dpa.pp b/manifests/dpa.pp index d159b36..26cdf69 100644 --- a/manifests/dpa.pp +++ b/manifests/dpa.pp @@ -1,4 +1,12 @@ -class php::dpa inherits php::repository { +class php::dpa( + $ensure = 'present', +) { + class { 'php::repository': + ensure => $ensure, + content => "deb [signed-by=/etc/apt/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${::lsbdistcodename} main\n", + dependencies => File['/etc/apt/keyrings/deb.sury.org-php.gpg'], + } + # Old location file { '/etc/apt/trusted.gpg.d/deb.sury.org-php.gpg': ensure => absent, @@ -9,22 +17,17 @@ class php::dpa inherits php::repository { } file { '/etc/apt/keyrings/deb.sury.org-php.gpg': - ensure => present, + ensure => $ensure, owner => "root", group => "root", mode => "0644", source => 'puppet:///modules/php/deb.sury.org.gpg', } - File['/etc/apt/sources.list.d/php.list'] { - content => "deb [signed-by=/etc/apt/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${::lsbdistcodename} main\n", - require => File['/etc/apt/keyrings/deb.sury.org-php.gpg'], - } - # Pinning # Adapted from https://dmvrtx.me/2023/06/php-7.4-on-debian-bookworm/ file { '/etc/apt/preferences.d/php': - ensure => present, + ensure => $ensure, owner => "root", group => "root", mode => "0644", |