| LEFT | RIGHT |
| (no file at all) | |
| 1 class sitescripts ( | 1 class sitescripts ( |
| 2 $directory = {}, |
| 2 $sitescriptsini_source = '', | 3 $sitescriptsini_source = '', |
| 3 $sitescriptsini_content = '', | 4 $sitescriptsini_content = '', |
| 4 ){ | 5 ){ |
| 5 | 6 |
| 6 ensure_resource('adblockplus::sitescripts::repository', 'sitescripts') | 7 ensure_resource('adblockplus::sitescripts::repository', 'sitescripts') |
| 8 |
| 9 ensure_resource('file', $title, merge({ |
| 10 'ensure' => 'directory', |
| 11 'path' => '/var/sitescripts', |
| 12 }, $directory)) |
| 13 |
| 14 $directory_path = getparam(File[$title], 'path') |
| 7 | 15 |
| 8 @concat {'/etc/sitescripts.ini': | 16 @concat {'/etc/sitescripts.ini': |
| 9 mode => '644', | 17 mode => '644', |
| 10 owner => root, | 18 owner => root, |
| 11 group => root, | 19 group => root, |
| 12 } | 20 } |
| 13 | 21 |
| 14 define configfragment($content = '', $source = '') { | 22 define configfragment($content = '', $source = '') { |
| 15 | 23 |
| 16 realize(Concat['/etc/sitescripts.ini']) | 24 realize(Concat['/etc/sitescripts.ini']) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 37 } | 45 } |
| 38 | 46 |
| 39 configfragment {'/etc/sitescripts.ini': | 47 configfragment {'/etc/sitescripts.ini': |
| 40 content => $content, | 48 content => $content, |
| 41 source => $source, | 49 source => $source, |
| 42 } | 50 } |
| 43 | 51 |
| 44 $configfragments = hiera('sitescripts::configfragments', {}) | 52 $configfragments = hiera('sitescripts::configfragments', {}) |
| 45 create_resources('sitescripts::configfragment', $configfragments) | 53 create_resources('sitescripts::configfragment', $configfragments) |
| 46 } | 54 } |
| LEFT | RIGHT |