Skip to content

Commit 7441c99

Browse files
committed
extend arch support for unicorn/nginx
1 parent 2760ddf commit 7441c99

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
$puppet_ssldir = '/etc/puppet/ssl'
9898
}
9999
'Archlinux': {
100+
$puppet_master_package = 'puppet'
100101
$puppet_agent_service = 'puppet.service'
101102
$puppet_agent_package = 'puppet'
102103
$puppet_conf = '/etc/puppet/puppet.conf'

manifests/unicorn.pp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,24 @@
5252
# if this is provided we install the package from the repo, otherwise we build unicorn from scratch
5353
if $unicorn_package {
5454
package {$unicorn_package:
55-
ensure => 'latest',
55+
ensure => latest,
5656
}
5757
} else {
5858
# 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,
6262
}
6363
}
6464
unless defined(Package['gcc']) {
6565
package {'gcc':
66-
ensure => 'latest',
66+
ensure => latest,
6767
}
6868
}
6969
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'],
7373
}
7474
}
7575
file {'unicorn-conf':
@@ -93,18 +93,18 @@
9393
}
9494
unless defined(Service['unicorn-puppetmaster']) {
9595
service{'unicorn-puppetmaster':
96-
ensure => 'running',
96+
ensure => running,
9797
enable => true,
9898
}
9999
}
100100
# update SELinux
101101
if $::selinux_config_mode == 'enforcing' {
102102
class { '::selinux':
103-
mode => 'enforcing'
103+
mode => 'enforcing',
104104
}
105105
selinux::module{ 'nginx':
106-
ensure => 'present',
107-
content => template('puppet/unicorn_selinux_template'),
106+
ensure => present,
107+
content => template('puppet/unicorn_selinux_template'),
108108
}
109109
}
110110

@@ -135,14 +135,14 @@
135135
content => template('puppet/puppetmaster'),
136136
} ->
137137
file {'enable-puppetmaster-vhost':
138-
ensure => 'link',
138+
ensure => link,
139139
path => '/etc/nginx/sites-enabled/puppetmaster',
140140
target => '/etc/nginx/sites-available/puppetmaster',
141141
notify => Service['nginx'],
142142
}
143143
unless defined(Service['nginx']) {
144144
service{'nginx':
145-
ensure => 'running',
145+
ensure => running,
146146
enable => true,
147147
require => File['enable-puppetmaster-vhost'],
148148
}

0 commit comments

Comments
 (0)