This repository has been archived by the owner on Jun 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-my-desktop.yml
242 lines (202 loc) · 6.34 KB
/
example-my-desktop.yml
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
---
- hosts: desktop
remote_user: root
# connection: local
gather_facts: yes
become: true
become_user: root
vars:
http_port: 80
max_clients: 200
roles:
- {role: consul, tags: [ 'consul' ], mode: 'server'}
# - {role: nodejs, tags: [ 'nodejs' ]}
tasks:
# UUID=66441842-737f-4cf2-82d1-7933083a8ec3 / ext4 defaults,noatime,discard,errors=remount-ro 0 1
# UUID=82dfaed0-c579-4829-b7d0-5bed264ff26f /usr/data/local2 ext4 defaults 0 2
- name: Create "local2" dir (2nd HDD mount point)
file:
path: /usr/data/local2
state: directory
mode: 0755
# No more local2
# - name: Mount up device by UUID
# mount:
# path: /usr/data/local2
# src: UUID=82dfaed0-c579-4829-b7d0-5bed264ff26f
# fstype: ext4
# opts: defaults
# state: present
# pashinin.com:/usr/data/ISO /usr/data/ISO nfs noauto,rw,async,user
# - name: PPAs
# apt_repository: repo={{item}}
# with_items:
# - ppa:mozillateam/firefox-next # beta firefox
# - ppa:graphics-drivers/ppa # nvidia drivers
# - ppa:kelleyk/emacs # emacs25 on Ubuntu 16.04
# - ppa:jonathonf/python-3.6 # python-3.6
# - ppa:pmjdebruijn/darktable-release # Darktable
# - ppa:kritalime/ppa # Krita
# - ppa:libreoffice/ppa # LibreOffice
# - name: ensure docker repository key is installed
# apt_key:
# id: "58118E89F3A912897C070ADBF76221572C52609D"
# keyserver: "hkp://p80.pool.sks-keyservers.net:80"
# state: present
# - apt_repository:
# repo: deb http://dl.google.com/linux/chrome/deb/ stable main
# state: present
# sudo add-apt-repository \
# "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
# $(lsb_release -cs) \
# stable"
# - name: remove old ones
# apt: name={{item}} state=removed
# with_items:
# - docker
# - docker-engine
# - docker.io
# - name: yarn key
# apt_key:
# url: https://dl.yarnpkg.com/debian/pubkey.gpg
# state: present
# - apt_repository:
# repo: deb https://dl.yarnpkg.com/debian/ stable main
# state: present
# - name: postgres 10 key
# apt_key:
# url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
# state: present
# - apt_repository:
# repo: deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main
# state: present
# - apt: name=postgresql-10 state=installed allow_unauthenticated=yes
- name: Some deps
apt: name={{item}} state=present
with_items:
- chrome-gnome-shell # gnome extensions in browser
- nfs-common # mount NFS shares
# dev
# - python3.6
# - python-virtualenv
- make
# - emacs25
- vim
# - yarn
- git
- python-pip
# - docker-ce
# Discord deps
# - libgconf-2-4
# - libappindicator1
# - libc++1
# - texlive-full
- pip:
name: ceph-deploy
# - user:
# name: ceph-deploy
# generate_ssh_key: yes
# ssh_key_bits: 2048
# ssh_key_file: .ssh/id_rsa
# - copy:
# src: files/sudoers-ceph-deploy
# dest: /etc/sudoers.d/ceph-deploy
# owner: root
# group: root
# mode: 0440
# - name: nvidia drivers
# apt:
# name: nvidia-384
# - name: Install latest LibreOffice
# apt:
# name: libreoffice
# state: latest
# - name: Install latest Firefox
# apt:
# name: firefox
# state: latest
# - name: Install latest Darktable
# apt:
# name: darktable
# state: latest
# only use ppa if > 16.04, 16.04 has old Krita
# - name: Install latest Krita
# apt:
# name: krita
# state: removed # latest
# Skype
# - name: Download Skype
# get_url:
# url: https://go.skype.com/skypeforlinux-64-preview.deb
# dest: /tmp/skypeforlinux-64-preview.deb
# - name: Install Skype
# apt:
# deb: /tmp/skypeforlinux-64-preview.deb
# - name: steam download
# get_url:
# url: http://media.steampowered.com/client/installer/steam.deb
# dest: /tmp/steam.deb
# - name: Install Steam
# apt:
# deb: /tmp/steam.deb
# For students
# Geany + pascalabc + Krita + ...
# - name: For students
# apt: name={{item}} state=installed
# with_items:
# - geany
# - mono-complete
# - lazarus
# # - krita # not from PPA on 16.04
# - name: Install Blender
# apt:
# name: blender
# - name: install pacemaker
# apt: name={{item}} state=absent # absent installed
# with_items:
# - pacemaker # recourse manager
# - corosync
# # - shell: crm configure property no-quorum-policy=ignore
# # - shell: crm configure property stonith-enabled=false
# - name: corosync.conf
# copy:
# src: files/corosync.desktop.conf
# dest: /etc/corosync/corosync.conf
# owner: root
# group: root
# mode: 0644
# when: false
# notify:
# - restart corosync
# does not work!
# need daemon.json file
# - lineinfile:
# path: /etc/default/docker
# regexp: '^DOCKER_OPTS='
# line: 'DOCKER_OPTS="-g /usr/data/local2/vm/docker"'
# notify:
# - restart docker
# - name: pips
# pip: name={{item}}
# with_items:
# - sphinx
# - sphinx_rtd_theme
# - name: get cluster state
# pacemaker_cluster: state=online
# - name: ensure apache is at the latest version
# yum: name=httpd state=latest
# - name: write the apache config file
# template: src=/srv/httpd.j2 dest=/etc/httpd.conf
# notify:
# - restart apache
# - name: ensure apache is running (and enable it at boot)
# service: name=httpd state=started enabled=yes
# handlers:
# - name: restart pacemaker
# systemd: name=pacemaker state=restarted
# - name: restart corosync
# systemd: name=corosync state=restarted
# - name: restart docker
# systemd: name=docker state=restarted
# - name: restart apache
# service: name=httpd state=restarted