restructure
This commit is contained in:
parent
fb6a488dac
commit
d1508efd3f
1
ansible/inventory/host_vars/fw00/fw00.yaml
Normal file
1
ansible/inventory/host_vars/fw00/fw00.yaml
Normal file
@ -0,0 +1 @@
|
||||
---
|
3
ansible/inventory/host_vars/hv00/hv00.yaml
Normal file
3
ansible/inventory/host_vars/hv00/hv00.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
vhd_template: "kube_template_vda.qcow2"
|
||||
root_vhd_pool_dir: "/vhds" # No trailing /
|
7
ansible/playbooks/00_baremetal.yaml
Normal file
7
ansible/playbooks/00_baremetal.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: bare metal os installation
|
||||
gather_facts: false
|
||||
hosts: hv00
|
||||
become: true
|
||||
roles:
|
||||
- baremetal
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Configure lab host
|
||||
- name: configure hyervisor host
|
||||
gather_facts: false
|
||||
hosts: lab
|
||||
hosts: hv00
|
||||
become: true
|
||||
|
||||
roles:
|
7
ansible/playbooks/02_vm_template.yaml
Normal file
7
ansible/playbooks/02_vm_template.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: create vm template
|
||||
hosts: hv00
|
||||
gather_facts: true
|
||||
become: true
|
||||
roles:
|
||||
- vm_template
|
@ -4,7 +4,7 @@
|
||||
gather_facts: true
|
||||
become: true
|
||||
roles:
|
||||
- k8s_vms
|
||||
- vm_deploy
|
||||
|
||||
- name: python bootstrap
|
||||
hosts: k8s
|
||||
@ -20,10 +20,3 @@
|
||||
roles:
|
||||
- sshd
|
||||
- firewall
|
||||
|
||||
- name: configure control plane
|
||||
hosts: k8s_control
|
||||
gather_facts: true
|
||||
become: false
|
||||
roles:
|
||||
- k8s_control
|
7
ansible/playbooks/04_k8s.yaml
Normal file
7
ansible/playbooks/04_k8s.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: configure control plane
|
||||
hosts: k8s_control
|
||||
gather_facts: true
|
||||
become: false
|
||||
roles:
|
||||
- k8s_control
|
2
ansible/roles/baremetal/defaults/main.yml
Normal file
2
ansible/roles/baremetal/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
iso_source:
|
3
ansible/roles/baremetal/files/packages
Normal file
3
ansible/roles/baremetal/files/packages
Normal file
@ -0,0 +1,3 @@
|
||||
linux-lts
|
||||
linux-lts-headers
|
||||
base
|
11
ansible/roles/baremetal/tasks/main.yml
Normal file
11
ansible/roles/baremetal/tasks/main.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: attach installation iso as virtual media
|
||||
|
||||
- name: boot from installation iso
|
||||
|
||||
- name: detect booted ip address
|
||||
|
||||
- name: configure disks
|
||||
|
||||
- name: sync ntp
|
||||
|
9
ansible/roles/baremetal/templates/eno.network.j2
Normal file
9
ansible/roles/baremetal/templates/eno.network.j2
Normal file
@ -0,0 +1,9 @@
|
||||
[Match]
|
||||
MACAddress={{ mac_address }}
|
||||
|
||||
[Link]
|
||||
ARP=no
|
||||
|
||||
[Network]
|
||||
DHCP=no
|
||||
Bond=lacp
|
1
ansible/roles/vm_template/defaults/main.yml
Normal file
1
ansible/roles/vm_template/defaults/main.yml
Normal file
@ -0,0 +1 @@
|
||||
---
|
7
ansible/roles/vm_template/tasks/main.yml
Normal file
7
ansible/roles/vm_template/tasks/main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
- name: sysprep the template vhd
|
||||
when: template_created is changed
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
virt-sysprep -a {{ root_vhd_pool_dir }}/{{ vhd_template }}
|
Loading…
Reference in New Issue
Block a user