-
Notifications
You must be signed in to change notification settings - Fork 1
/
boinc.yml
78 lines (66 loc) · 1.94 KB
/
boinc.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
---
- name: Setup BOINC World Community Grid Compute node
hosts: boinc
tasks:
- name: install some basic packages
yum:
name:
- tmux
- git
- vim-enhanced
- python3
- python3-pip
- tuned
- tuned-utils
- setools-console
- policycoreutils-python-utils
- setroubleshoot-server
- pcp-system-tools
- wpa_supplicant
- NetworkManager
- NetworkManager-tui
- NetworkManager-wifi
- nodejs
- name: Ensure SELinux Enforcing
selinux:
policy: targeted
state: enforcing
- name: enable journald persistent storage
file:
path: /var/log/journal
state: directory
- name: Get tuned profile
slurp:
src: /etc/tuned/active_profile
register: tuned_active_profile
- debug:
msg: "{{ tuned_active_profile['content'] | b64decode | trim }}"
- name: tuned-adm set throughput-performance
shell: /usr/sbin/tuned-adm profile throughput-performance
when: "tuned_active_profile['content'] | b64decode | trim != 'throughput-performance'"
- name: ensure logind ignores lidswitch for laptops
lineinfile:
path: /etc/systemd/logind.conf
regexp: '^HandleLidSwitch='
line: HandleLidSwitch=ignore
insertafter: '^\[Login\]'
when: ansible_form_factor in mobile_form_factors
notify: restart logind
- name: don't allow password based ssh
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^PasswordAuthentication'
line: "PasswordAuthentication no"
notify: restart sshd
- name: run the boinc role
import_role:
name: worldcommunitygrid
handlers:
- name: restart logind
service:
name: systemd-logind
state: restarted
- name: restart sshd
service:
name: sshd
state: restarted