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

@ -8,4 +8,8 @@ ssh_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDDEEf2vpLMXa2o9tA3xeoPWMZ0Dk1MjIV9AOPyKT4Gi8jSovEnN+Hu1FQhODLkRx+CGkD5dV9rirbL6yD4BC9vNXoO2FeQpgRPAl1WkMpmg+AvVmroOUlsiNYCQL/F/yIAGwXiIo4mWTcsYDNngnlFkmqWzjaUG1VltmVOJtN+YVYvMj5ak/NYnFQIF7UsUZ/TRmQ9pvej2Yw001crhqe7SUfCYinJL/ynBmT/pXnd2hKJR5JSQl9uqBpsOFhPBUuShKjOMH+zc/6aM/MNEPNBnstvykztht6t4u8umu7LujcfWotwccz8rBhDSU6sIii0hbzxIeNWcM2pvNp/YtqmpEXpDJ8Yz8ffQY92lreR6picfvkqkoR+RA2uhMGP0VzajWCLPYQAHFmWOZIba6PpvJ5bkTSM+IA8U5dtBJ7l9D4vCKhUeybZUHTKL3hwxpaumu75giszKtZ15SA76QhZ5fLz+AuG2LdQwgnEgcdgLmrXXGi3/SOhvj5O9JGkrt5dIJHNo1sADulqhCLXjurlE2I55j2SloLmpduVKTUSD+OC0iTqIwzn8Sk6VVgSYfrUoZs7ySmFKG4SH+2iAcatj3z6r45y6eGqGaLdkeSFRlA6PJPuI85p6Fc44NxOEFae5wXV/G9nWHsnfZYv8cr73gaIo4duUg7fqmdjJ8BeDw== /home/frank/.ssh/id_rsa.auth
ansible_cfg_repo: infra/ansible-common
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