add more shit

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
Frank Villaro-Dixon 2024-10-04 20:37:55 +02:00
parent 3e20eb8828
commit f2f505cfc8
7 changed files with 53 additions and 1 deletions

View file

@ -9,3 +9,7 @@ ssh_keys:
ansible_cfg_repo: infra/ansible-common
journal_volatile: true
setup_ntp: true

View file

@ -3,6 +3,10 @@
name: systemd-timesyncd
state: restarted
- name: restart systemd-journald
systemd:
name: systemd-journald
state: restarted
- name: restart sshd
systemd:

23
tasks/journald.yml Normal file
View file

@ -0,0 +1,23 @@
# Make the systemd journal volatile (i.e. don't store it to disk)
# only do that on raspberry Pis
- name: Set systemd journal to volatile
ini_file:
path: /etc/systemd/journald.conf
section: Journal
option: Storage
value: volatile
notify: restart systemd-journald
when: ansible_architecture == 'armv7l' and vars.journal_volatile
- name: Set systemd journal max usage
ini_file:
path: /etc/systemd/journald.conf
section: Journal
option: RuntimeMaxUse
value: 100M
notify: restart systemd-journald
when: ansible_architecture == 'armv7l' and vars.journal_volatile

View file

@ -1,4 +1,7 @@
- import_tasks: journald.yml
- import_tasks: ntp.yml
- import_tasks: ssh.yml
- import_tasks: remove_alarm.yml
- import_tasks: motd.yml
- import_tasks: setup_backup.yml
- import_tasks: pkgs.yml

View file

@ -5,4 +5,5 @@
option: NTP
value: "{{ vars.ntp_servers | join(' ') }}"
notify: restart systemd-timesyncd
when: vars.setup_ntp is true

13
tasks/pkgs.yml Normal file
View file

@ -0,0 +1,13 @@
- name: Install some necessary pkgs
ansible.builtin.package:
name: "{{ item }}"
state: present
with_items:
- vim
- tcpdump
- curl
- wget
- iftop
- iotop
- dfc
- htop

4
tasks/setup_backup.yml Normal file
View file

@ -0,0 +1,4 @@
- name: Install rsync for backuping
ansible.builtin.package:
name: rsync
state: present