Some rough templates

This commit is contained in:
YuruC3 2025-05-12 00:01:30 +02:00
parent af4c1e7348
commit de9280fd5e
4 changed files with 116 additions and 0 deletions

3
galeraDeploy.vars.yaml Normal file
View File

@ -0,0 +1,3 @@
---
vars1: "1"
vars2: "2"

57
galeraDeploy.yaml Normal file
View File

@ -0,0 +1,57 @@
---
- name: Install galera cluster
hosts: 1.2.3.4
become: yes
gather_facts: yes
vars_files:
- galeraDeploy.vars.yaml
pre_tasks:
- name: update
apt:
upgrade: no
update_cache: yes
cache_valid_time: 14400 #4h
- name: upgrade
apt:
upgrade: yes
- name: apt dist-upgrade
apt:
upgrade: dist
- name: remove hanging packages and clean repos
apt:
autoremove: true
autoclean: true
tasks:
- name: Install dependencies
apt:
state: present
name:
- wget
- curl
- mariadb-server
- mariadb-client
- galera-4
- name: template to copy from
apt:
state: brainrot
set_fact:
wazuh_agent_name: "{{ ansible_hostname }}"
environment:
WAZUH_AGENT_GROUP: "{{ wazuh_agent_groups }}"
WAZUH_MANAGER: "{{ wazuh_manager_ip }}"
WAZUH_AGENT_NAME: "{{ wazuh_agent_name }}"
# bootstarp on first node
# galera_new_cluster

3
loadBalancers.vars.yaml Normal file
View File

@ -0,0 +1,3 @@
---
vars1: "1"
vars2: "2"

53
loadBalancers.yaml Normal file
View File

@ -0,0 +1,53 @@
---
- name: Install LB for galera cluster
hosts: 1.2.3.4
become: yes
gather_facts: yes
vars_files:
- loadBalancers.vars.yaml
pre_tasks:
- name: update
apt:
upgrade: no
update_cache: yes
cache_valid_time: 14400 #4h
- name: upgrade
apt:
upgrade: yes
- name: apt dist-upgrade
apt:
upgrade: dist
- name: remove hanging packages and clean repos
apt:
autoremove: true
autoclean: true
tasks:
- name: Install dependencies
apt:
state: present
name:
- wget
- curl
- keepalived
- haproxy
- name: template to copy from
apt:
state: brainrot
environment:
WAZUH_AGENT_GROUP: "{{ wazuh_agent_groups }}"
WAZUH_MANAGER: "{{ wazuh_manager_ip }}"
WAZUH_AGENT_NAME: "{{ wazuh_agent_name }}"
# bootstarp on first node
# galera_new_cluster