diff options
-rw-r--r-- | files/preferences | 7 | ||||
-rw-r--r-- | manifests/dpa.pp | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/files/preferences b/files/preferences new file mode 100644 index 0000000..23ee6c1 --- /dev/null +++ b/files/preferences @@ -0,0 +1,7 @@ +Package: php* +Pin: release o=Debian +Pin-Priority: 990 + +Package: php* +Pin: origin "packages.sury.org" +Pin-Priority: 990 diff --git a/manifests/dpa.pp b/manifests/dpa.pp index 74ba174..1a69e6c 100644 --- a/manifests/dpa.pp +++ b/manifests/dpa.pp @@ -11,4 +11,14 @@ class php::dpa inherits php::repository { content => "deb https://packages.sury.org/php/ ${::lsbdistcodename} main\n", require => File['/etc/apt/trusted.gpg.d/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, + owner => "root", + group => "root", + mode => "0644", + source => 'puppet:///modules/php/preferences', + } } |