Remove is_vm, include vm.yaml

This commit is contained in:
Mark Janssen 2024-07-11 22:16:15 +02:00
parent 0507d01bc6
commit 705d2fcd23
6 changed files with 14 additions and 13 deletions

View file

@ -1,5 +1,4 @@
ssh_port: "22"
is_vm: false
unattended_upgrades_auto_reboot_time: "04:00"
unattended_upgrades_extra_origin_patterns: []
trusted_ranges:

View file

@ -31,24 +31,26 @@
when: root_access is defined and root_access
tags: authorized_keys
- tags: network
- name: Import network tasks
ansible.builtin.import_tasks:
file: network.yaml
tags: network
- tags: node-exporter
- name: Import node-exporter
ansible.builtin.import_tasks:
file: node-exporter.yaml
tags: node-exporter
- tags: vm
- name: Import vm tasks
ansible.builtin.import_tasks:
file: node-exporter.yaml
when: is_vm
file: vm.yaml
tags: vm
- name: Remove debian-packages we don't want
ansible.builtin.apt:
state: absent
autoremove: true
pkg: {{ debian_packages_unwanted|default([]) }}
pkg: "{{ debian_packages_unwanted|default([]) }}"
- name: Install standard packages
ansible.builtin.apt:

View file

@ -2,6 +2,9 @@
- name: Install guest agent
ansible.builtin.apt:
name: qemu-guest-agent
when: ansible_virtualization_role|default(false) == 'guest'
tags:
- questagent
- name: Serial Console
ansible.builtin.lineinfile:
@ -11,5 +14,5 @@
notify:
- update grub
- reboot
- ansible.builtin.meta: flush_handlers
tags:
- questagent