add new roles
This commit is contained in:
49
playbooks/roles/arch/files/27.jsonc
Normal file
49
playbooks/roles/arch/files/27.jsonc
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "small",
|
||||
"padding": {
|
||||
"top": 1
|
||||
}
|
||||
},
|
||||
"display": {
|
||||
"separator": " "
|
||||
},
|
||||
"modules": [
|
||||
"break",
|
||||
"title",
|
||||
{
|
||||
"type": "os",
|
||||
"key": "os ",
|
||||
"keyColor": "red"
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"key": "kernel",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"format": "{vendor} {family}",
|
||||
"key": "host ",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": "pkgs ",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"format": "{?days}{days}d {?}{hours}h {minutes}m",
|
||||
"key": "uptime",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "memory",
|
||||
"keyColor": "cyan"
|
||||
},
|
||||
"break"
|
||||
]
|
||||
}
|
||||
2246
playbooks/roles/arch/files/check_mk_agent
Executable file
2246
playbooks/roles/arch/files/check_mk_agent
Executable file
File diff suppressed because it is too large
Load Diff
3
playbooks/roles/arch/files/checkmk_push.sh
Executable file
3
playbooks/roles/arch/files/checkmk_push.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/local/bin/check_mk_agent | ssh monitor 'cat > /omd/sites/monitoring/var/pushed_checks/pi2'
|
||||
79
playbooks/roles/arch/tasks/main.yml
Normal file
79
playbooks/roles/arch/tasks/main.yml
Normal 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"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user