Skip to content

Commit

Permalink
Merge pull request puppetlabs#37 from Andrew-Hayes/vmfloaty_updates
Browse files Browse the repository at this point in the history
Updated vmfloaty module to allow different home dirs
  • Loading branch information
seamymckenna authored Dec 16, 2016
2 parents 53103c4 + 9cc2b60 commit 00d041d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tools/laptop_puppetisation/modules/vmfloaty/data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
vmfloaty::config_file: '/.vmfloaty.yml'
vmfloaty::config_file: '.vmfloaty.yml'
vmfloaty::home_dir: '/Users'
vmfloaty::config_file_mode: '0444'
vmfloaty::config_template: 'vmfloaty/vmfloaty.yml.epp'
vmfloaty::package_ensure: 'present'
Expand Down
10 changes: 6 additions & 4 deletions tools/laptop_puppetisation/modules/vmfloaty/manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class vmfloaty::config inherits vmfloaty {

if $vmpooler_token != undef {
$home_dir = "/Users/$mac_current_user/"
file { $home_dir:
$user_home_dir = "$vmfloaty::home_dir/$mac_current_user/"
file { $user_home_dir:
ensure => directory,
before => File["$home_dir$vmfloaty::config_file"],
before => File["$user_home_dir$vmfloaty::config_file"],
}

file { "$home_dir$vmfloaty::config_file":
file { "$user_home_dir$vmfloaty::config_file":
ensure => file,
owner => 0,
group => 0,
Expand All @@ -16,5 +16,7 @@
'user_name' => $jira_assignee,
'user_token' => $vmpooler_token}),
}
} else {
notify { 'No vmpooler token detected, so cannot configure vmfloaty': }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
String $package_ensure,
String $package_name,
String $vmpooler_url,
String $home_dir,
) {
contain vmfloaty::install
contain vmfloaty::config
Expand Down

0 comments on commit 00d041d

Please sign in to comment.