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, owner => "root", group => "root", mode => "0644", source => 'puppet:///modules/php/deb.sury.org.gpg', } file { '/etc/apt/keyrings/deb.sury.org-php.gpg': ensure => $ensure, owner => "root", group => "root", mode => "0644", source => 'puppet:///modules/php/deb.sury.org.gpg', } # Pinning # Adapted from https://dmvrtx.me/2023/06/php-7.4-on-debian-bookworm/ file { '/etc/apt/preferences.d/php': ensure => $ensure, owner => "root", group => "root", mode => "0644", source => 'puppet:///modules/php/preferences', } }