add new roles

This commit is contained in:
2026-03-27 17:56:57 +01:00
parent 15f6a52487
commit bf1f284780
8 changed files with 2491 additions and 25 deletions

View File

@@ -0,0 +1,79 @@
#SPDX-License-Identifier: MIT-0
---
# tasks to setup arch hosts
# Pacman
- name: Run full system upgrade
community.general.pacman:
update_cache: true
upgrade: true
- name: Add cronjob for daily updates
ansible.builtin.cron:
name: "daily full upgrade"
user: root
special_time: daily
job: "pacman -Syu --noconfirm"
- name: Add pacman animation
ansible.builtin.lineinfile:
path: /etc/pacman.conf
line: ILoveCandy
# Fastfetch prompt
- name: Install fastfetch
community.general.pacman:
name: fastfetch
state: present
- name: Create .config directory
ansible.builtin.file:
path: /home/alarm/.config
state: directory
owner: alarm
group: alarm
mode: '0755'
- name: Copy fastfetch config
ansible.builtin.copy:
src: 27.jsonc
dest: /home/alarm/.config/27.jsonc
owner: alarm
group: alarm
mode: '0744'
- name: Add welcomeprompt to .bashrc
ansible.builtin.lineinfile:
path: /home/alarm/.bashrc
line: fastfetch -c /home/alarm/.config/27.jsonc
# Setup checkmk agent
- name: Copy checkmk agent
ansible.builtin.copy:
src: check_mk_agent
dest: /usr/local/bin/check_mk_agent
owner: root
group: root
mode: '0755'
- name: Copy checkmk push script
ansible.builtin.copy:
src: checkmk_push.sh
dest: /usr/local/bin/checkmk_push.sh
owner: root
group: root
mode: '0755'
- name: Add checkmk cronjob
ansible.builtin.cron:
name: "checkmk push"
user: root
minute: "*/5"
job: "/usr/local/bin/checkmk_push.sh"