-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSuperPiInitialSetup.yml
More file actions
53 lines (52 loc) · 1.69 KB
/
SuperPiInitialSetup.yml
File metadata and controls
53 lines (52 loc) · 1.69 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
- hosts: superpi
remote_user: ubuntu
become: yes
tasks:
#Shut down password authentication for SSH
- name: Shut Down Root Login
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#PermitRootLogin prohibit-password'
line: PermitRootLogin no
- name: Disable Password authentication
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#PasswordAuthentication yes'
line: PasswordAuthentication no
#Set up static IP addresses
- name: Superpi1 Static IP address
when: "'superpi1' in inventory_hostname"
blockinfile:
path: /etc/dhcpcd.conf
block: |
interface wlan0
static ip_address=192.168.1.220
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
- name: Superpi2 Static IP address
when: "'superpi2' in inventory_hostname"
blockinfile:
path: /etc/dhcpcd.conf
block: |
interface wlan0
static ip_address=192.168.1.224
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
- name: Superpi3 Static IP address
when: "'superpi3' in inventory_hostname"
blockinfile:
path: /etc/dhcpcd.conf
block: |
interface wlan0
static ip_address=192.168.1.222
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
- name: Superpi4 Static IP address
when: "'superpi4' in inventory_hostname"
blockinfile:
path: /etc/dhcpcd.conf
block: |
interface wlan0
static ip_address=192.168.1.223
static routers=192.168.1.1
static domain_name_servers=192.168.1.1