| OLD | NEW |
| 1 # == Class: adblockplus | 1 # == Class: adblockplus |
| 2 # | 2 # |
| 3 # The adblockplus class and the associated adblockplus:: namespace are | 3 # The adblockplus class and the associated adblockplus:: namespace are |
| 4 # used to integrate Puppet modules with each other, in order to assemble | 4 # used to integrate Puppet modules with each other, in order to assemble |
| 5 # the setups used by the Adblock Plus project. | 5 # the setups used by the Adblock Plus project. |
| 6 # | 6 # |
| 7 # === Parameters: | 7 # === Parameters: |
| 8 # | 8 # |
| 9 # [*authority*] | 9 # [*authority*] |
| 10 # The authorative domain or zone associated with the current environment, | 10 # The authorative domain or zone associated with the current environment, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 # users => { | 29 # users => { |
| 30 # 'pinocchio' => { | 30 # 'pinocchio' => { |
| 31 # # see adblockplus::user | 31 # # see adblockplus::user |
| 32 # }, | 32 # }, |
| 33 # }, | 33 # }, |
| 34 # } | 34 # } |
| 35 # | 35 # |
| 36 class adblockplus ( | 36 class adblockplus ( |
| 37 $authority = hiera('adblockplus::authority', 'adblockplus.org'), | 37 $authority = hiera('adblockplus::authority', 'adblockplus.org'), |
| 38 $hosts = hiera_hash('adblockplus::hosts', {}), | 38 $hosts = hiera_hash('adblockplus::hosts', {}), |
| 39 $packages = hiera_array('adblockplus::packages', []), |
| 39 $users = hiera_hash('adblockplus::users', {}), | 40 $users = hiera_hash('adblockplus::users', {}), |
| 40 ) { | 41 ) { |
| 41 | 42 |
| 42 # See https://issues.adblockplus.org/ticket/3574#comment:8 | 43 # See https://issues.adblockplus.org/ticket/3574#comment:8 |
| 43 class {'base': | 44 class {'base': |
| 44 zone => $authority, | 45 zone => $authority, |
| 45 } | 46 } |
| 46 | 47 |
| 47 # Class['apt'] cannot yet be configured to update on-demand | 48 # Class['apt'] cannot yet be configured to update on-demand |
| 48 class {'apt': | 49 class {'apt': |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 notify => Service['ssh']; | 94 notify => Service['ssh']; |
| 94 '/etc/ssh/ssh_host_rsa_key.pub': | 95 '/etc/ssh/ssh_host_rsa_key.pub': |
| 95 source => 'puppet:///modules/adblockplus/development_host_rsa_key.pub', | 96 source => 'puppet:///modules/adblockplus/development_host_rsa_key.pub', |
| 96 mode => 644; | 97 mode => 644; |
| 97 } | 98 } |
| 98 } | 99 } |
| 99 | 100 |
| 100 # Fix implicit package dependency Class['apt'] does not properly handle | 101 # Fix implicit package dependency Class['apt'] does not properly handle |
| 101 Exec['apt_update'] -> Package<|title != 'python-software-properties'|> | 102 Exec['apt_update'] -> Package<|title != 'python-software-properties'|> |
| 102 | 103 |
| 104 # https://issues.adblockplus.org/ticket/3574#comment:18 |
| 105 ensure_packages($packages) |
| 106 |
| 103 # https://projects.puppetlabs.com/issues/4145 | 107 # https://projects.puppetlabs.com/issues/4145 |
| 104 ensure_resource('file', '/etc/ssh/ssh_known_hosts', { | 108 ensure_resource('file', '/etc/ssh/ssh_known_hosts', { |
| 105 ensure => 'present', | 109 ensure => 'present', |
| 106 mode => 0644, | 110 mode => 0644, |
| 107 }) | 111 }) |
| 108 | 112 |
| 109 # See modules/adblockplus/manifests/host.pp | 113 # See modules/adblockplus/manifests/host.pp |
| 110 create_resources('adblockplus::host', $hosts) | 114 create_resources('adblockplus::host', $hosts) |
| 111 | 115 |
| 112 # See modules/adblockplus/manifests/user.pp | 116 # See modules/adblockplus/manifests/user.pp |
| 113 create_resources('adblockplus::user', $users) | 117 create_resources('adblockplus::user', $users) |
| 114 } | 118 } |
| OLD | NEW |