-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0d7b6e3
Showing
8 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.retry | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Arch Linux ARM Raspberry Pi 3 - ansible playbook | ||
|
||
|
||
Follow the | ||
[official installation instructions](https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3). | ||
|
||
Python is required on the target host by Ansible so you have to install that. | ||
|
||
``` | ||
pacman -S python | ||
``` | ||
|
||
Check if ansible can reach the pi: | ||
|
||
``` | ||
ansible all -i 192.168.1.256, -m ping --ask-pass -u alarm | ||
``` | ||
|
||
Run the playbook. | ||
|
||
``` | ||
ansible-playbook playbook.yml -i 192.168.1.256, --ask-pass -u alarm --ask-become-pass --become-method=su | ||
``` | ||
|
||
The default user is `alarm` the password is `alarm` and the become password is | ||
`root`. | ||
|
||
|
||
After running the playbook successfully remove the alarm user and change the root password and create a password for the newly created user: | ||
|
||
``` | ||
# passwd USERNAME | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
- hosts: all | ||
become: true | ||
vars: | ||
gpumem: 160 | ||
hostname: mono | ||
timezone: Europe/Budapest | ||
username: ijanos | ||
|
||
tasks: | ||
- name: Set hostname | ||
hostname: | ||
name={{ hostname }} | ||
|
||
- name: Setup locale.gen | ||
template: | ||
src: locale.gen.j2 | ||
dest: /etc/locale.gen | ||
notify: locale-regen | ||
|
||
- name: Setup locale.conf | ||
template: | ||
src: locale.conf.j2 | ||
dest: /etc/locale.conf | ||
|
||
- name: Setup boot config | ||
template: | ||
src: config.txt.j2 | ||
dest: /boot/config.txt | ||
|
||
- name: Set the timezone | ||
file: | ||
src: /usr/share/zoneinfo/{{ timezone }} | ||
dest: /etc/localtime | ||
state: link | ||
|
||
- name: Set up memory-only journal logging | ||
template: | ||
src: journald.conf.j2 | ||
dest: /etc/systemd/journald.conf | ||
|
||
- name: Upgrade the system | ||
pacman: | ||
update_cache: yes | ||
upgrade: yes | ||
|
||
|
||
- name: Install packages | ||
pacman: name={{ item }} | ||
with_items: | ||
- vim | ||
- mc | ||
- bash-completion | ||
- htop | ||
- tmux | ||
- base-devel | ||
- avahi | ||
- nss-mdns | ||
- wget | ||
|
||
- name: enable mDNS | ||
template: | ||
src: nsswitch.conf.j2 | ||
dest: /etc/nsswitch.conf | ||
|
||
- name: Enable avahi service | ||
service: | ||
name: avahi-daemon | ||
enabled: yes | ||
state: started | ||
|
||
- name: Add normal user | ||
user: | ||
name: "{{ username }}" | ||
group: users | ||
groups: wheel | ||
append: yes | ||
createhome: yes | ||
|
||
- name: Allow wheel group to have sudo rights | ||
lineinfile: | ||
dest: /etc/sudoers | ||
state: present | ||
regexp: '^%wheel' | ||
line: '%wheel ALL=(ALL) ALL' | ||
validate: visudo -cf %s | ||
|
||
handlers: | ||
- name: locale-regen | ||
command: locale-gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# See /boot/overlays/README for all available options | ||
|
||
gpu_mem={{ gpumem }} | ||
disable_overscan=1 | ||
enable_uart=0 | ||
force_turbo=0 | ||
hdmi_ignore_cec_init=1 | ||
disable_splash=1 | ||
force_hdmi_open=1 | ||
|
||
initramfs initramfs-linux.img followkernel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[Journal] | ||
Storage=volatile | ||
Compress=yes | ||
RuntimeMaxUse=40M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LANG=en_US.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
en_US.UTF-8 UTF-8 | ||
hu_HU.UTF-8 UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Begin /etc/nsswitch.conf | ||
|
||
passwd: compat mymachines systemd | ||
group: compat mymachines systemd | ||
shadow: compat | ||
|
||
publickey: files | ||
|
||
hosts: files mdns_minimal [NOTFOUND=return] dns myhostname wins | ||
networks: files | ||
|
||
protocols: files | ||
services: files | ||
ethers: files | ||
rpc: files | ||
|
||
netgroup: files | ||
|
||
# End /etc/nsswitch.conf |