homeserver initial commit
- ansible - docker-compose - Kubernetes_deployments
This commit is contained in:
11
ansible/inventory/group_vars/all.yaml
Normal file
11
ansible/inventory/group_vars/all.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# Proxmox access related variables
|
||||
proxmox_api_url: "192.168.1.121"
|
||||
|
||||
# Cloud-init image related variables
|
||||
image_url: "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
|
||||
image_dest: "/tmp/cloud-image.img"
|
||||
image_format: "qcow2"
|
||||
storage_name: "local"
|
||||
|
||||
# ansible venv
|
||||
ansible_venv: "/home/taqi/.venv/ansible/bin/python"
|
||||
4
ansible/inventory/group_vars/vms.yaml
Normal file
4
ansible/inventory/group_vars/vms.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apt_packages:
|
||||
- curl
|
||||
- vim
|
||||
- htop
|
||||
29
ansible/inventory/host_vars/proxmox1.yaml
Normal file
29
ansible/inventory/host_vars/proxmox1.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
# VM related variables
|
||||
vm_list:
|
||||
- id: 106
|
||||
name: "vm6"
|
||||
memory: 4096
|
||||
cores: 2
|
||||
disk_size: 30G
|
||||
ip: "192.168.1.151/24"
|
||||
gateway: "192.168.1.1"
|
||||
nameserver1: "1.1.1.1"
|
||||
nameserver2: "8.8.8.8"
|
||||
- id: 107
|
||||
name: "vm7"
|
||||
memory: 4096
|
||||
cores: 2
|
||||
disk_size: 30G
|
||||
ip: "192.168.1.152/24"
|
||||
gateway: "192.168.1.1"
|
||||
nameserver1: "1.1.1.1"
|
||||
nameserver2: "8.8.8.8"
|
||||
|
||||
# cloud-init variables
|
||||
node: "homeserver1"
|
||||
net0: "virtio,bridge=vmbr0"
|
||||
# disk_name: "local:1000/vm-1000-disk-0.raw,discard=on"
|
||||
disk_path: "/var/lib/vz/images/1000"
|
||||
ide2: "local:cloudinit,format=qcow2"
|
||||
boot_order: "order=scsi0"
|
||||
scsi_hw: "virtio-scsi-pci"
|
||||
30
ansible/inventory/host_vars/proxmox2.yaml
Normal file
30
ansible/inventory/host_vars/proxmox2.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
# VM related variables
|
||||
vm_list:
|
||||
- id: 206
|
||||
name: "vm8"
|
||||
memory: 4096
|
||||
cores: 2
|
||||
disk_size: 30G
|
||||
ip: "192.168.1.161/24"
|
||||
gateway: "192.168.1.1"
|
||||
nameserver1: "1.1.1.1"
|
||||
nameserver2: "8.8.8.8"
|
||||
- id: 207
|
||||
name: "vm9"
|
||||
memory: 4096
|
||||
cores: 2
|
||||
disk_size: 30G
|
||||
ip: "192.168.1.162/24"
|
||||
gateway: "192.168.1.1"
|
||||
nameserver1: "1.1.1.1"
|
||||
nameserver2: "8.8.8.8"
|
||||
|
||||
|
||||
# cloud-init template variables
|
||||
node: "homeserver2"
|
||||
net0: "virtio,bridge=vmbr0"
|
||||
# disk_name: "local:2000/vm-2000-disk-0.raw,discard=on"
|
||||
disk_path: "/var/lib/vz/images/2000"
|
||||
ide2: "local:cloudinit,format=qcow2"
|
||||
boot_order: "order=scsi0"
|
||||
scsi_hw: "virtio-scsi-pci"
|
||||
51
ansible/inventory/hosts.yaml
Normal file
51
ansible/inventory/hosts.yaml
Normal file
@ -0,0 +1,51 @@
|
||||
all:
|
||||
children:
|
||||
hypervisors:
|
||||
vms:
|
||||
|
||||
hypervisors:
|
||||
children:
|
||||
server1:
|
||||
server2:
|
||||
|
||||
server1:
|
||||
hosts:
|
||||
proxmox1:
|
||||
ansible_host: 192.168.1.121
|
||||
ansible_user: "{{ ansible_proxmox_user }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
|
||||
server2:
|
||||
hosts:
|
||||
proxmox2:
|
||||
ansible_host: 192.168.1.122
|
||||
ansible_user: "{{ ansible_proxmox_user }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
|
||||
vms:
|
||||
children:
|
||||
vm_group_1:
|
||||
vm_group_2:
|
||||
|
||||
vm_group_1:
|
||||
hosts:
|
||||
vm6:
|
||||
ansible_host: 192.168.1.151
|
||||
ansible_user: "{{ ansible_vm_user }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
vm7:
|
||||
ansible_host: 192.168.1.152
|
||||
ansible_user: "{{ ansible_vm_user }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
|
||||
vm_group_2:
|
||||
hosts:
|
||||
vm8:
|
||||
ansible_host: 192.168.1.161
|
||||
ansible_user: "{{ ansible_vm_user }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
vm9:
|
||||
ansible_host: 192.168.1.162
|
||||
ansible_user: "{{ ansible_vm_user }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
|
||||
Reference in New Issue
Block a user