|
52 | 52 | # if this is provided we install the package from the repo, otherwise we build unicorn from scratch
|
53 | 53 | if $unicorn_package {
|
54 | 54 | package {$unicorn_package:
|
55 |
| - ensure => 'latest', |
| 55 | + ensure => latest, |
56 | 56 | }
|
57 | 57 | } else {
|
58 | 58 | # install unicorn
|
59 |
| - unless defined(Package['ruby-devel']) { |
60 |
| - package {'ruby-devel': |
61 |
| - ensure => 'latest', |
| 59 | + unless defined(Package[$ruby_dev]) { |
| 60 | + package {$ruby_dev: |
| 61 | + ensure => latest, |
62 | 62 | }
|
63 | 63 | }
|
64 | 64 | unless defined(Package['gcc']) {
|
65 | 65 | package {'gcc':
|
66 |
| - ensure => 'latest', |
| 66 | + ensure => latest, |
67 | 67 | }
|
68 | 68 | }
|
69 | 69 | package {['unicorn', 'rack']:
|
70 |
| - ensure => 'latest', |
71 |
| - provider => 'gem', |
72 |
| - require => Package['ruby-devel', 'gcc'], |
| 70 | + ensure => latest, |
| 71 | + provider => gem, |
| 72 | + require => Package[$ruby_dev, 'gcc'], |
73 | 73 | }
|
74 | 74 | }
|
75 | 75 | file {'unicorn-conf':
|
|
93 | 93 | }
|
94 | 94 | unless defined(Service['unicorn-puppetmaster']) {
|
95 | 95 | service{'unicorn-puppetmaster':
|
96 |
| - ensure => 'running', |
| 96 | + ensure => running, |
97 | 97 | enable => true,
|
98 | 98 | }
|
99 | 99 | }
|
100 | 100 | # update SELinux
|
101 | 101 | if $::selinux_config_mode == 'enforcing' {
|
102 | 102 | class { '::selinux':
|
103 |
| - mode => 'enforcing' |
| 103 | + mode => 'enforcing', |
104 | 104 | }
|
105 | 105 | selinux::module{ 'nginx':
|
106 |
| - ensure => 'present', |
107 |
| - content => template('puppet/unicorn_selinux_template'), |
| 106 | + ensure => present, |
| 107 | + content => template('puppet/unicorn_selinux_template'), |
108 | 108 | }
|
109 | 109 | }
|
110 | 110 |
|
|
135 | 135 | content => template('puppet/puppetmaster'),
|
136 | 136 | } ->
|
137 | 137 | file {'enable-puppetmaster-vhost':
|
138 |
| - ensure => 'link', |
| 138 | + ensure => link, |
139 | 139 | path => '/etc/nginx/sites-enabled/puppetmaster',
|
140 | 140 | target => '/etc/nginx/sites-available/puppetmaster',
|
141 | 141 | notify => Service['nginx'],
|
142 | 142 | }
|
143 | 143 | unless defined(Service['nginx']) {
|
144 | 144 | service{'nginx':
|
145 |
| - ensure => 'running', |
| 145 | + ensure => running, |
146 | 146 | enable => true,
|
147 | 147 | require => File['enable-puppetmaster-vhost'],
|
148 | 148 | }
|
|
0 commit comments