Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Minor changes after running puppet-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mukaibot committed Aug 21, 2014
1 parent 120568b commit 527d35f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class artifactory (
class artifactory (
$username = $artifactory::params::username,
$pass_hash = $artifactory::params::pass_hash,
$manage_java = $artifactory::params::manage_java,
Expand Down
42 changes: 21 additions & 21 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
class artifactory::install inherits artifactory {

if $::osfamily == "Debian" {
if $::osfamily == 'Debian' {

$url = "http://dl.bintray.com/jfrog/artifactory/artifactory-${app_version}.zip"
$extracted = "$app_dir/artifactory-${app_version}"
$url = "http://dl.bintray.com/jfrog/artifactory/artifactory-${artifactory::app_version}.zip"
$artifactory::extracted = "${artifactory::app_dir}/artifactory-${artifactory::app_version}"

if $caller_module_name != $module_name {
fail("Use of private class ${name} by ${caller_module_name}")
}

file { $app_data:
file { $artifactory::app_data:
ensure => directory,
mode => '0755',
owner => $username,
group => $username
owner => $artifactory::username,
group => $artifactory::username
}
-> file { $app_dir:
-> file { $artifactory::app_dir:
ensure => directory,
mode => '0755',
owner => $username,
group => $username
owner => $artifactory::username,
group => $artifactory::username
}
-> staging::deploy { "artifactory-${app_version}.zip":
-> staging::deploy { "artifactory-${artifactory::app_version}.zip":
source => $url,
creates => $extracted,
target => $app_dir,
user => $username,
group => $username
creates => $artifactory::extracted,
target => $artifactory::app_dir,
user => $artifactory::username,
group => $artifactory::username
}
-> file { "${app_dir}/current":
-> file { "${artifactory::app_dir}/current":
ensure => link,
target => $extracted
target => $artifactory::extracted
}
-> file { "${app_dir}/current/data":
-> file { "${artifactory::app_dir}/current/data":
ensure => link,
target => $app_data
target => $artifactory::app_data
}

} elsif $::osfamily == "RedHat" {
} elsif $::osfamily == 'RedHat' {
package { 'artifactory':
ensure => installed,
provider => "rpm",
source => "http://downloads.sourceforge.net/project/artifactory/artifactory/${app_version}/artifactory-${app_version}.rpm",
provider => 'rpm',
source => "http://downloads.sourceforge.net/project/artifactory/artifactory/${artifactory::app_version}/artifactory-${artifactory::app_version}.rpm",
}
}

Expand Down
14 changes: 7 additions & 7 deletions manifests/service.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class artifactory::service inherits artifactory {
if $::osfamily == "Debian" {

if $::osfamily == 'Debian' {

file { '/etc/init.d/artifactory':
ensure => present,
Expand All @@ -15,14 +15,14 @@
enable => true,
}

} elsif $::osfamily == "RedHat" {
} elsif $::osfamily == 'RedHat' {

service { 'artifactory':
ensure => 'running',
enable => "true",
hasstatus => "false",
provider => "redhat",
require => Package['artifactory']
enable => true,
hasstatus => false,
provider => 'redhat',
require => Package['artifactory']
}
}

Expand Down
6 changes: 3 additions & 3 deletions manifests/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
fail("Use of private class ${name} by ${caller_module_name}")
}

user { $username:
user { $artifactory::username:
ensure => present,
managehome => true,
home => $app_data,
password => $pass_hash
home => $artifactory::app_data,
password => $artifactory::pass_hash
}
}

0 comments on commit 527d35f

Please sign in to comment.