-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkstation.pp
More file actions
131 lines (112 loc) · 2.72 KB
/
workstation.pp
File metadata and controls
131 lines (112 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
include apt
$user = "dagolap"
$user_group = "dagolap"
$user_realname = "Dag Olav Prestegarden"
$user_email = "dagolav@prestegarden.com"
Package {
ensure => present
}
Exec {
path => [ "/bin", "/usr/bin", "/sbin", "/usr/sbin" ]
}
File {
owner => "$user",
group => "$user_group"
}
#####
# Add ppas, anb do it before apt-get update
#####
Apt::Ppa{} -> Exec["apt-update"]
apt::ppa { "ppa:ubuntu-mozilla-daily/firefox-aurora": }
apt::ppa { "ppa:nilarimogard/webupd8": }
apt::ppa { "ppa:git-core/ppa": }
#####
# Add debian repos without using ppa mechanism
#####
Apt::Source{} -> Exec["apt-update"] #Apply all apt source operations before apt-get update
apt::source { 'synapse-core':
comment => 'Synapse quick launcher',
location => 'http://ppa.launchpad.net/synapse-core/ppa/ubuntu',
release => 'trusty',
repos => 'main',
key => {
'id' => '3DD99294193A09EF9270EEAFE4010F076C2225A4',
'server' => 'keyserver.ubuntu.com',
},
include => {
'src' => true,
'deb' => true,
},
}
apt::source { 'nodejs':
comment => 'Nodejs and NPM Javascript tools',
location => 'https://deb.nodesource.com/node_4.x',
release => 'wily',
repos => 'main',
key => {
'id' => '9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280',
'server' => 'keyserver.ubuntu.com',
},
include => {
'src' => true,
'deb' => true,
},
}
apt::source { 'chrome':
comment => 'Google Chrome Web Browser',
location => 'http://dl.google.com/linux/chrome/deb',
release => 'stable',
repos => 'main',
key => {
'id' => '4CCA1EAF950CEE4AB83976DCA040830F7FAC5991',
'server' => 'keyserver.ubuntu.com',
},
include => {
'deb' => true,
},
}
#####
# Apt-get update before installing anything
####
# Do i really need this?
Exec["apt-update"] -> Package <| |>
exec { "apt-update":
command => "/usr/bin/apt-get update"
}
#####
# Desktop use
#####
package {["google-chrome-beta", "chromium-browser", "firefox", "synapse", "keepass2"]:}
#####
# General setup
#####
package {["zsh"]:}
#####
# Developer Tools
#####
# Version Control Systems
package {["git", "mercurial", "bzr"]:}
# Editors
package {["vim-nox", "vim-gtk", "emacs"]:}
# Virtualization
package {["virtualbox", "vagrant"]:}
# Tools
package {["tmux", "mosh"]:}
# Python
package {["python", "python-virtualenv", "virtualenvwrapper"]:}
# Javascript
package {["nodejs"]:}
exec {"install-docker":
command => "wget -qO- https://get.docker.com/ | sh && usermod -aG docker $user",
logoutput => true,
timeout => 0,
user => "root",
}
exec {"install-dotfiles":
command => "/home/$user/.computer-setup/setup-dotfiles",
cwd => "/home/$user/.computer-setup",
logoutput => true,
timeout => 0,
user => $user,
environment => "HOME=/home/$user"
}