From 74d515930abbf2278ac4387cb16f5f2ce5f08807 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 31 Dec 2024 18:22:12 -0300 Subject: Fix: disable deb.sury repo by default --- manifests/dpa.pp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'manifests/dpa.pp') 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", -- cgit v1.2.3