-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.yaml
43 lines (36 loc) · 1.24 KB
/
setup.yaml
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
---
- hosts: pillama
gather_facts: false
become: true
tasks:
- name: Ansible apt install server packages
ansible.builtin.apt:
name:
- htop
- git
- rsync
- snapd
- docker-compose
update_cache: true
state: present
tags: packages
- name: Setup Docker compose file
copy:
dest: "/home/{{ ansible_user }}/docker-compose.yaml"
mode: "0644"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
src: docker-compose.yaml
- name: Setup WIFI interface
ansible.builtin.command:
cmd: nmcli con add con-name hotspot ifname wlan0 type wifi ssid "Pillama-Wifi"
- name: Setup WIFI wpa-psk
ansible.builtin.command:
cmd: nmcli con modify hotspot wifi-sec.key-mgmt wpa-psk
- name: Setup WIFI password
ansible.builtin.command:
cmd: nmcli con modify hotspot wifi-sec.psk "pillamawifi"
- name: Setup WIFI as access-point
ansible.builtin.command:
cmd: nmcli con modify hotspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
# Reference: https://raspberrytips.com/access-point-setup-raspberry-pi/#setting-up-an-access-point-on-raspberry-pi-os-bookworm