Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class pasture {
- $port = '80'
- $default_character = 'sheep'
- $default_message = ''
- $pasture_config_file = '/etc/pasture_config.yaml'
- package { 'pasture':
- ensure => present,
- provider => 'gem',
- before => File[$pasture_config_file],
- }
- $pasture_config_hash = {
- 'port' => $port,
- 'default_character' => $default_character,
- 'default_message' => $default_message,
- }
- file { $pasture_config_file:
- content => epp('pasture/pasture_config.yaml.epp', $pasture_config_hash),
- notify => Service['pasture'],
- }
- $pasture_service_hash = {
- 'pasture_config_file' => $pasture_config_file,
- }
- file { '/etc/systemd/system/pasture.service':
- content => epp('pasture/pasture.service.epp', $pasture_service_hash),
- notify => Service['pasture'],
- }
- service { 'pasture':
- ensure => running,
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement