Commit fd662c9d34ebbcbb721b50605083a51e139397d6
1 parent
d7ba16de2b
Exists in
master
Try to avoid inherits
Showing 5 changed files with 29 additions and 8 deletions Side-by-side Diff
modules/people/manifests/hanjianwei.pp
1 | -class people::hanjianwei { | |
1 | +class people::hanjianwei ( | |
2 | + $home = $people::hanjianwei::config::home, | |
3 | + $dotfiles = $people::hanjianwei::config::dotfiles, | |
4 | + $srcdir = $people::hanjianwei::config::srcdir | |
5 | +) inherits people::hanjianwei::config { | |
2 | 6 | include people::hanjianwei::osx |
3 | 7 | include people::hanjianwei::repositories |
4 | 8 | include people::hanjianwei::applications |
modules/people/manifests/hanjianwei/applications.pp
1 | -class people::hanjianwei::applications inherits people::hanjianwei::config { | |
2 | - notify { "${homebrew::config::cachedir}": } | |
1 | +class people::hanjianwei::applications( | |
2 | + $home = $people::hanjianwei::config::home, | |
3 | + $dotfiles = $people::hanjianwei::config::dotfiles | |
4 | +) { | |
3 | 5 | |
4 | 6 | # Declare all Homebrew packages |
5 | 7 | package { |
... | ... | @@ -53,7 +55,7 @@ |
53 | 55 | 'welly', |
54 | 56 | 'xmind' |
55 | 57 | ]: |
56 | - provider => 'brewcask' | |
58 | + provider => 'brewcask' | |
57 | 59 | } |
58 | 60 | |
59 | 61 | # Taps |
modules/people/manifests/hanjianwei/mirrors.pp
1 | -class people::hanjianwei::mirrors inherits people::hanjianwei::config { | |
1 | +class people::hanjianwei::mirrors( | |
2 | + $home = $people::hanjianwei::config::home, | |
3 | + $dotfiles = $people::hanjianwei::config::dotfiles | |
4 | +) { | |
2 | 5 | include boxen::gemrc |
3 | 6 | |
4 | - File <| title == "/Users/${::boxen_user}/.gemrc" |> { | |
7 | + File <| title == "${home}/.gemrc" |> { | |
5 | 8 | source => "${dotfiles}/Gem/gemrc", |
6 | 9 | require => Repository["${dotfiles}"] |
7 | 10 | } |
modules/people/manifests/hanjianwei/osx.pp
modules/people/manifests/hanjianwei/repositories.pp
1 | -class people::hanjianwei::repositories inherits people::hanjianwei::config { | |
1 | +class people::hanjianwei::repositories( | |
2 | + $home = $people::hanjianwei::config::home, | |
3 | + $dotfiles = $people::hanjianwei::config::dotfiles, | |
4 | + $srcdir = $people::hanjianwei::config::srcdir | |
5 | +) { | |
6 | + | |
2 | 7 | # Git |
3 | 8 | file { "${home}/.gitconfig": |
4 | 9 | target => "${dotfiles}/Git/gitconfig", |
... | ... | @@ -8,6 +13,10 @@ |
8 | 13 | # Repos |
9 | 14 | repository { "${dotfiles}": |
10 | 15 | source => 'hanjianwei/dotfiles' |
16 | + } | |
17 | + | |
18 | + repository { "${srcdir}/diyao/web": | |
19 | + source => 'hanjianwei/diyao-web' | |
11 | 20 | } |
12 | 21 | } |