add new roles
This commit is contained in:
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