aboutsummaryrefslogtreecommitdiff
path: root/manifests/dpa.pp
blob: 8292d610114da4498f96473ebd2bd7b4efdd8fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class php::dpa {
  file { '/etc/apt/trusted.gpg.d/deb.sury.org-php.gpg':
    ensure  => present,
    owner   => "root",
    group   => "root",
    mode    => "0644",
    source  => 'puppet:///modules/php/deb.sury.org.gpg',
  }

  file { '/etc/apt/sources.list.d/php.list':
    ensure  => present,
    owner   => "root",
    group   => "root",
    mode    => "0644",
    content => "deb https://packages.sury.org/php/ ${::lsbdistcodename} main\n",
    require => File['/etc/apt/trusted.gpg.d/deb.sury.org-php.gpg'],
    notify  => Exec['php-apt-auto-update'],
  }

  exec { 'php-apt-auto-update':
    command     => "/usr/bin/apt-get update",
    user        => "root",
    refreshonly => true,
  }
}