Ansible.K3sCluster/playbook.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

2022-04-18 10:58:57 +00:00
- hosts: localhost
gather_facts: false
vars_files:
- hypervisor.vcenter.yml
- cluster.k3s.yml
2022-04-18 10:58:57 +00:00
tasks:
- name: Deploy VMs from OVF-template
# community.vmware.vmware_guest:
community.vmware.vmware_deploy_ovf:
hostname: "{{ hv.hostname }}"
username: "{{ hv.username }}"
password: "{{ hv_password }}"
2022-04-18 10:58:57 +00:00
validate_certs: no
datacenter: "{{ hv.datacenter }}"
folder: "{{ hv.folder }}"
cluster: "{{ hv.cluster }}"
ovf: "https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/Ubuntu-Server-20.04.ova"
name: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum)[-5:] | upper }}"
# guest_id: "{{ item.guest_id }}"
# hardware:
# memory_mb: 8192
# num_cpus: 4
# disk:
# - size_gb: 50
# type: thin
datastore: "{{ hv.datastore }}"
# networks:
# - name: "{{ hv.network }}"
# ip: "{{ item.ip | ansible.utils.ipaddr('address') }}"
# netmask: "{{ item.ip | ansible.utils.ipaddr('netmask') }}"
# cdrom:
# - type: iso
# iso_path: "[{{ hv.isodatastore }}] {{ item.iso_path }}"
# controller_number: 0
# unit_number: 0
# state: poweredon
power_on: yes
# customization_spec: "{{ customization_spec }}"
delegate_to: localhost
2022-04-18 10:58:57 +00:00
with_items: "{{ servers }}"