blob: 8f41dff1ef28e073d391878bdbfc26efcf0f616f (
plain) (
blame)
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
|
---
## TODO: for now we assume we are running on a rpi-3
- name: enable/disable wifi
lineinfile:
path: /boot/config.txt
line: dtoverlay=pi3-disable-wifi
state: "{% if raspbian_disable_wifi %}present{% else %}absent{% endif %}"
- name: enable/disable bluetooh
lineinfile:
path: /boot/config.txt
line: dtoverlay=pi3-disable-bt
state: "{% if raspbian_disable_bluetooth %}present{% else %}absent{% endif %}"
- name: enable ssh-server
systemd:
name: ssh
enabled: yes
- name: remove pi user
user:
name: pi
state: absent
remove: yes
force: yes
- name: remove sudoers config for pi user
file:
path: /etc/sudoers.d/010_pi-nopasswd
state: absent
- name: set hostname
hostname:
name: "{{ host_name }}"
- name: update hostname in /etc/hosts
lineinfile:
path: /etc/hosts
backrefs: yes
regexp: '^(127.0.1.1\s+)'
line: '\g<1>{{ host_name }}'
|