2024-05-13 03:23:09 +00:00
|
|
|
- name: Set timezone
|
|
|
|
file:
|
|
|
|
src: "/usr/share/zoneinfo/{{ timezone|default('UTC') }}"
|
|
|
|
dest: /etc/localtime
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
state: link
|
|
|
|
|
2022-10-27 04:12:06 +00:00
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- psmisc
|
2022-10-28 05:10:07 +00:00
|
|
|
- pkgfile
|
|
|
|
- linux-firmware
|
|
|
|
- bind # dig
|
2023-03-03 22:30:56 +00:00
|
|
|
- man-db
|
2023-04-23 20:19:16 +00:00
|
|
|
- uutils-coreutils
|
2023-08-16 19:10:50 +00:00
|
|
|
- usbutils # for lsusb
|
2024-02-06 22:52:24 +00:00
|
|
|
- bolt
|
2024-06-27 01:22:15 +00:00
|
|
|
- whois
|
2022-10-27 04:12:06 +00:00
|
|
|
state: present
|
2022-10-28 05:10:07 +00:00
|
|
|
|
|
|
|
- name: Start pkgfile update service
|
|
|
|
systemd:
|
|
|
|
state: started
|
|
|
|
name: pkgfile-update.timer
|
|
|
|
daemon_reload: yes
|
|
|
|
enabled: yes
|
|
|
|
|
|
|
|
- name: Install scripts
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
|
|
|
- src: mount_disk_image
|
|
|
|
dest: /usr/local/bin/mount_disk_image
|
2023-07-03 16:54:10 +00:00
|
|
|
- src: watch_linux
|
|
|
|
dest: /usr/local/bin/ww
|
2024-05-17 01:20:30 +00:00
|
|
|
|
|
|
|
- name: Configure sysctls
|
|
|
|
sysctl:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
state: present
|
|
|
|
sysctl_file: /etc/sysctl.d/{{ item.file }}
|
|
|
|
loop:
|
|
|
|
# Of questionable value since I don't use swap on my machines
|
|
|
|
- name: vm.swappiness
|
|
|
|
value: 10
|
|
|
|
file: swap.conf
|
|
|
|
# Enable TCP packetization-layer PMTUD when an ICMP black hole is detected.
|
|
|
|
- name: net.ipv4.tcp_mtu_probing
|
|
|
|
value: 1
|
|
|
|
file: tcp.conf
|
|
|
|
# Switch to bbr tcp congestion control which should be better on lossy connections like bad wifi.
|
|
|
|
- name: net.ipv4.tcp_congestion_control
|
|
|
|
value: bbr
|
|
|
|
file: tcp.conf
|
|
|
|
# Don't do a slow start after a connection has been idle for a single RTO.
|
|
|
|
- name: net.ipv4.tcp_slow_start_after_idle
|
|
|
|
value: 0
|
|
|
|
file: tcp.conf
|
|
|
|
# 3x time to accumulate filesystem changes before flushing to disk.
|
|
|
|
- name: vm.dirty_writeback_centisecs
|
|
|
|
value: 1500
|
|
|
|
file: power.conf
|
2024-09-12 18:47:17 +00:00
|
|
|
# Adjust ttl
|
|
|
|
- name: net.ipv4.ip_default_ttl
|
|
|
|
value: 65
|
|
|
|
file: ttl.conf
|
|
|
|
- name: net.ipv6.conf.all.hop_limit
|
|
|
|
value: 65
|
|
|
|
file: ttl.conf
|
|
|
|
- name: net.ipv6.conf.default.hop_limit
|
|
|
|
value: 65
|
|
|
|
file: ttl.conf
|