Holyday tmp
This commit is contained in:
parent
f40d2eeeba
commit
234e986eff
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
|||||||
[submodule "k3s-ansible"]
|
[submodule "k3s-ansible"]
|
||||||
path = k3s-ansible
|
path = k3s-ansible
|
||||||
url = https://github.com/k3s-io/k3s-ansible
|
url = https://github.com/k3s-io/k3s-ansible
|
||||||
|
[submodule "postgresql_cluster"]
|
||||||
|
path = postgresql_cluster
|
||||||
|
url = https://github.com/vitabaks/postgresql_cluster.git
|
||||||
|
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
all: setup k3s wg
|
all: setup wg k3s
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
ansible-playbook -i "inventory/hosts.yml" "init.yml"
|
ansible-playbook -i "inventory/hosts.yml" "init.yml"
|
||||||
|
@ -3,5 +3,11 @@ k3s_version: v1.23.6+k3s1
|
|||||||
# ansible_user: debian
|
# ansible_user: debian
|
||||||
systemd_dir: /etc/systemd/system
|
systemd_dir: /etc/systemd/system
|
||||||
master_ip: "{{ hostvars[groups['master'][0]]['wireguard_ip'] | default(groups['master'][0]) }}"
|
master_ip: "{{ hostvars[groups['master'][0]]['wireguard_ip'] | default(groups['master'][0]) }}"
|
||||||
extra_server_args: "--no-deploy traefik --advertise-address {{hostvars[inventory_hostname]['wireguard_ip']}}"
|
extra_server_args: "--no-deploy traefik --advertise-address {{hostvars[inventory_hostname]['wireguard_ip']}} --flannel-iface wg0 --tls-san {{ ansible_host }}"
|
||||||
extra_agent_args: ""
|
extra_agent_args: "--flannel-iface wg0 --node-external-ip {{hostvars[inventory_hostname]['ansible_default_ipv4']['address']}}"
|
||||||
|
|
||||||
|
cluster_vip: "10.20.0.2"
|
||||||
|
patroni_cluster_name: "postgres-cluster"
|
||||||
|
with_haproxy_load_balancing: false
|
||||||
|
postgresql_version: "14"
|
||||||
|
postgresql_data_dir: "/var/lib/postgresql/{{ postgresql_version }}/{{ postgresql_cluster_name }}"
|
||||||
|
@ -6,15 +6,10 @@ all:
|
|||||||
hostname: cp
|
hostname: cp
|
||||||
wireguard_ip: 10.20.0.2
|
wireguard_ip: 10.20.0.2
|
||||||
outsider:
|
outsider:
|
||||||
ansible_host: 51.15.109.2
|
ansible_host: 51.15.60.240
|
||||||
is_nas: false
|
is_nas: false
|
||||||
hostname: outsider
|
hostname: outsider
|
||||||
wireguard_ip: 10.20.0.1
|
wireguard_ip: 10.20.0.1
|
||||||
local:
|
|
||||||
ansible_connection: local
|
|
||||||
ansible_host: 127.0.0.1
|
|
||||||
is_local: true
|
|
||||||
wireguard_ip: 10.20.0.3
|
|
||||||
children:
|
children:
|
||||||
master:
|
master:
|
||||||
hosts:
|
hosts:
|
||||||
@ -22,6 +17,20 @@ all:
|
|||||||
node:
|
node:
|
||||||
hosts:
|
hosts:
|
||||||
outsider:
|
outsider:
|
||||||
|
etcd_cluster:
|
||||||
|
hosts:
|
||||||
|
cp:
|
||||||
|
outsider:
|
||||||
|
master:
|
||||||
|
hosts:
|
||||||
|
cp:
|
||||||
|
replica:
|
||||||
|
hosts:
|
||||||
|
outsider:
|
||||||
|
postgres_cluster:
|
||||||
|
children:
|
||||||
|
master:
|
||||||
|
replica:
|
||||||
k3s_cluster:
|
k3s_cluster:
|
||||||
children:
|
children:
|
||||||
master:
|
master:
|
||||||
|
@ -20,3 +20,8 @@
|
|||||||
ansible.builtin.hostname:
|
ansible.builtin.hostname:
|
||||||
name: "{{ hostname }}"
|
name: "{{ hostname }}"
|
||||||
when: hostname is defined
|
when: hostname is defined
|
||||||
|
|
||||||
|
- name: Install open-iscsi
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: open-iscsi
|
||||||
|
state: present
|
||||||
|
1
postgresql_cluster
Submodule
1
postgresql_cluster
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d5c67c8422bdf8fcf00f2ab66135945e9dfba5fd
|
Loading…
Reference in New Issue
Block a user