pve init
This commit is contained in:
@@ -38,21 +38,21 @@ all:
|
||||
# https://wiki.k-space.ee/hosting/proxmox
|
||||
proxmox:
|
||||
hosts:
|
||||
pve1:
|
||||
pve1.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.1
|
||||
pve2:
|
||||
pve2.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.2
|
||||
pve8:
|
||||
pve8.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.8
|
||||
pve9:
|
||||
pve9.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.9
|
||||
pve90:
|
||||
pve90.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.90
|
||||
pve91:
|
||||
pve91.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.91
|
||||
pve92:
|
||||
pve92.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.92
|
||||
pve93:
|
||||
pve93.proxmox.infra.k-space.ee:
|
||||
ansible_host: 172.21.20.93
|
||||
bgp:
|
||||
children:
|
||||
|
27
proxmox/general.yaml
Normal file
27
proxmox/general.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: PVE base configuration
|
||||
hosts: proxmox
|
||||
tasks:
|
||||
- name: Generate ipid
|
||||
set_fact:
|
||||
new_fact: "{{ inventory_hostname | regex_replace('pve', '') }}"
|
||||
|
||||
- name: UI primary IP (/etc/hosts)
|
||||
tags: network
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: ' {{ inventory_hostname_short }}$'
|
||||
line: '2001:bb8:4008:21:20::{{ ipid }} {{ inventory_hostname }} {{ inventory_hostname_short }}'
|
||||
|
||||
- name: /etc/network/interfaces
|
||||
tags: network
|
||||
ansible.builtin.template:
|
||||
src: templates/network.interfaces.j2
|
||||
dest: /etc/network/interfaces
|
||||
notify: reload networking
|
||||
|
||||
handlers:
|
||||
- name: reload networking
|
||||
ansible.builtin.systemd_service:
|
||||
name: networking.service
|
||||
state: reloaded
|
Reference in New Issue
Block a user