fix inventory, roles and playbook
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
---
|
||||
# tasks to setup arch hosts
|
||||
|
||||
# Base setup
|
||||
- name: Install cronie
|
||||
community.general.pacman:
|
||||
name: cronie
|
||||
state: present
|
||||
|
||||
# Pacman
|
||||
- name: Run full system upgrade
|
||||
@@ -16,10 +21,19 @@
|
||||
special_time: daily
|
||||
job: "pacman -Syu --noconfirm"
|
||||
|
||||
- name: Add pacman animation
|
||||
- name: Enable Color in pacman.conf
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pacman.conf
|
||||
regexp: '^#?Color'
|
||||
line: Color
|
||||
insertafter: '^\[options\]'
|
||||
|
||||
- name: Enable ILoveCandy in pacman.conf
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pacman.conf
|
||||
regexp: '^#?ILoveCandy'
|
||||
line: ILoveCandy
|
||||
insertafter: '^\[options\]'
|
||||
|
||||
# Fastfetch prompt
|
||||
- name: Install fastfetch
|
||||
@@ -72,6 +86,12 @@
|
||||
minute: "*/5"
|
||||
job: "/usr/local/bin/checkmk_push.sh"
|
||||
|
||||
# general tasks
|
||||
- name: Install rsync
|
||||
community.general.pacman:
|
||||
name: rsync
|
||||
state: present
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,19 +42,19 @@ HOME_TARGETS=(
|
||||
)
|
||||
|
||||
for i in "${HOME_TARGETS[@]}"; do
|
||||
rsync -avP "machine:/home/vashqlf/${i}" "${HOME_PATH}${i}"
|
||||
rsync -avP "machine:/home/vashqlf/${i}" "${HOME_PATH}"
|
||||
done
|
||||
echo "[INFO] $(date --rfc-3339 s) - Done!"
|
||||
|
||||
## Backup cloud hosts
|
||||
# Strato1: vaultwarden
|
||||
echo "[INFO] $(date --rfc-3339 s) - Syncing strato1:/home/pw-manager/vaultwarden..."
|
||||
rsync -avP "strato1:/home/pw-manager/vaultwarden" "${BKP_PATH}vaultwarden"
|
||||
rsync -avP "strato1:/home/pw-manager/vaultwarden" "${BKP_PATH}"
|
||||
echo "[INFO] $(date --rfc-3339 s) - Done!"
|
||||
|
||||
# Strato3: Checkmk
|
||||
echo "[INFO] $(date --rfc-3339 s) - Syncing strato3:/usr/local/share/cmk-bkp..."
|
||||
rsync -avP "strato3:/usr/local/share/cmk-bkp" "${BKP_PATH}cmk-bkp"
|
||||
rsync -avP "strato3:/usr/local/share/cmk-bkp" "${BKP_PATH}"
|
||||
echo "[INFO] $(date --rfc-3339 s) - Done!"
|
||||
|
||||
echo "[INFO] $(date --rfc-3339 s) - Syncing completed, nothing more to do."
|
||||
|
||||
@@ -16,11 +16,7 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Enable ufw
|
||||
community.general.ufw:
|
||||
state: enabled
|
||||
become: true
|
||||
when: ansible_facts['os_family'] == "Archlinux"
|
||||
|
||||
- name: Allow SSH
|
||||
community.general.ufw:
|
||||
@@ -36,7 +32,7 @@
|
||||
port: 161
|
||||
proto: udp
|
||||
become: true
|
||||
when: ansible_facts["os_family"]
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
|
||||
- name: Allow port 6556 for check_mk
|
||||
community.general.ufw:
|
||||
@@ -44,4 +40,9 @@
|
||||
port: 6556
|
||||
proto: tcp
|
||||
become: true
|
||||
when: ansible_facts["os_family"]
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
|
||||
- name: Enable ufw
|
||||
community.general.ufw:
|
||||
state: enabled
|
||||
become: true
|
||||
|
||||
Reference in New Issue
Block a user