2024-08-20 10:00:11 +02:00

56 lines
1.3 KiB
YAML

---
- name: Install tools
apt:
name:
- ksm-control-daemon
- ethtool
- patch
tags: pve
- name: Deploy ksm configuration
template: src=ksmtuned.conf.j2 dest=/etc/ksmtuned.conf
notify: restart ksmtuned
tags: pve
- name: Handle ksm services
service: name=ksmtuned state={{ pve_ksm | ternary('started','stopped') }} enabled={{ pve_ksm | ternary(True,False) }}
tags: pve
- include_tasks: pve_online.yml
when: pve_online == True
tags: always
- name: Create backup dir
file: path=/home/lbkp/pve state=directory
tags: pve
- name: Install pre and post backup scripts
copy: src={{ item.src }} dest=/etc/backup/{{ item.type }}.d/{{ item.src }} mode=755
loop:
- src: pve_dump
type: pre
- src: pve_rm_dump
type: post
tags: pve
- name: Remove registration nag
patch: src=remove_nag.patch dest=/usr/share/perl5/PVE/API2/Subscription.pm
ignore_errors: True # Don't fail on old PVE where the patch doesn't apply
notify: restart pveproxy
tags: pve
- name: Ensure dehydrated hook dir exists
file: path=/etc/dehydrated/hooks_deploy_cert.d/ state=directory
tags: pve,ssl
- name: Deploy dehydrated hook
template: src=dehydrated_hook.sh.j2 dest=/etc/dehydrated/hooks_deploy_cert.d/20pve.sh mode=755
tags: pve,ssl
- include_tasks: zabbix.yml
tags: always
- include_tasks: filebeat.yml
tags: always