This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
eae-am-deutschen-platz/playbook_provision_hyper01.yml

33 lines
972 B
YAML

---
- name: provision hyper01
hosts: hyper01
tasks:
- name: install node-exporter
package:
name: prometheus-node-exporter
- name: create vms/container
hosts: 127.0.0.1
connection: local
gather_facts: no
tasks:
- name: create monitoring01
proxmox:
api_user: root@pam
api_password: "{{ lookup('passwordstore', 'server/hyper01') }}"
api_host: "{{ hostvars['hyper01']['ip'] }}"
node: hyper01
hostname: monitoring01
onboot: yes
cpus: 2
disk: 50
memory: 1024
storage: 'local-zfs'
ostemplate: 'local:vztmpl/debian-11-standard_11.3-1_amd64.tar.zst'
password: "{{ lookup('passwordstore', 'vms/monitoring01/root') }}"
pubkey: "{{ lookup('ansible.builtin.file', 'files/authorized_keys') }}"
netif: '{"net0":"name=eth0,ip=10.84.1.51/24,gw=10.84.1.1,bridge=vmbr0"}'
unprivileged: yes
features:
- nesting=1