56 lines
1.3 KiB
YAML
Raw Normal View History

2021-12-01 19:13:34 +01:00
---
- name: Install tools
apt:
name:
- ksm-control-daemon
- ethtool
- patch
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Deploy ksm configuration
template: src=ksmtuned.conf.j2 dest=/etc/ksmtuned.conf
notify: restart ksmtuned
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Handle ksm services
service: name=ksmtuned state={{ pve_ksm | ternary('started','stopped') }} enabled={{ pve_ksm | ternary(True,False) }}
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- include_tasks: pve_online.yml
when: pve_online == True
2022-03-07 16:00:05 +01:00
tags: always
2021-12-01 19:13:34 +01:00
- name: Create backup dir
file: path=/home/lbkp/pve state=directory
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Install pre and post backup scripts
copy: src={{ item.src }} dest=/etc/backup/{{ item.type }}.d/{{ item.src }} mode=755
2022-03-07 16:00:05 +01:00
loop:
2021-12-01 19:13:34 +01:00
- src: pve_dump
type: pre
- src: pve_rm_dump
type: post
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- 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
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Ensure dehydrated hook dir exists
file: path=/etc/dehydrated/hooks_deploy_cert.d/ state=directory
2022-03-07 16:00:05 +01:00
tags: pve,ssl
2021-12-01 19:13:34 +01:00
- name: Deploy dehydrated hook
template: src=dehydrated_hook.sh.j2 dest=/etc/dehydrated/hooks_deploy_cert.d/20pve.sh mode=755
2022-03-07 16:00:05 +01:00
tags: pve,ssl
2021-12-01 19:13:34 +01:00
2022-03-07 16:00:05 +01:00
- include_tasks: zabbix.yml
tags: always
- include_tasks: filebeat.yml
tags: always