feat: use builtin virtualisation detection
This commit is contained in:
parent
6d2695274c
commit
02d15fb57a
6 changed files with 15 additions and 14 deletions
|
|
@ -42,8 +42,8 @@
|
|||
- name: "swap"
|
||||
ansible.builtin.import_tasks: "swap.yaml"
|
||||
when:
|
||||
- 'type == "vm"'
|
||||
- "ansible_os_family =='Debian'"
|
||||
- "ansible_virtualization_type == 'kvm'"
|
||||
tags: "swap"
|
||||
|
||||
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
# chrony
|
||||
- name: "ntp"
|
||||
ansible.builtin.import_tasks: "ntp.yaml"
|
||||
when: 'type == "vm" or type == "hw"'
|
||||
when: "ansible_virtualization_type == 'kvm'"
|
||||
tags: "ntp"
|
||||
|
||||
# flush handler
|
||||
|
|
@ -140,8 +140,8 @@
|
|||
- name: "lxd"
|
||||
ansible.builtin.import_tasks: "lxd.yaml"
|
||||
when:
|
||||
- 'type == "vm"'
|
||||
- "ansible_os_family == 'Debian'"
|
||||
- "ansible_os_family =='Debian'"
|
||||
- "ansible_virtualization_type == 'kvm'"
|
||||
tags: "lxd"
|
||||
|
||||
# flush handler
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
# sysctl
|
||||
- name: "sysctl - set sysctl"
|
||||
ansible.builtin.import_tasks: "sysctl.yaml"
|
||||
when: 'type == "vm" or type == "hw"'
|
||||
when: "ansible_virtualization_type == 'kvm'"
|
||||
tags: "sysctl"
|
||||
|
||||
# systemctl
|
||||
|
|
@ -161,8 +161,8 @@
|
|||
loop_control:
|
||||
loop_var: "__systemctl"
|
||||
when:
|
||||
- 'type == "vm"'
|
||||
- "ansible_os_family == 'Debian'"
|
||||
- "ansible_os_family =='Debian'"
|
||||
- "ansible_virtualization_type == 'kvm'"
|
||||
tags: "systemctl"
|
||||
|
||||
# syslog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue