ansible-roles/roles/pve/tasks/pve_online.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

2021-12-01 19:13:34 +01:00
---
- name: Install dependencies
apt:
name:
- libnet-route-perl
- libnet-address-ip-local-perl
- libarray-diff-perl
- libdata-validate-ip-perl
- liblogger-syslog-perl
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Deploy Online.net integration script
copy: src=pve-online dest=/usr/local/bin/pve-online mode=755
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Deploy Online.net integration conf
template: src=pve-online.conf.j2 dest=/etc/pve-online.conf mode=600
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Create hook directory on local storage
file: path=/var/lib/vz/snippets state=directory
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Deploy Online hook
copy: src=online_hook.pl dest=/var/lib/vz/snippets/online_hook.pl mode=755
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Ensure /etc/systemd/system/ exists
file: path=/etc/systemd/system/ state=directory
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Disable pve-online-gre service
service: name=pve-online-gre state=stopped enabled=False
failed_when: False
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Remove pve-online-gre service unit
file: path=/etc/systemd/system/pve-online-gre.service state=absent
register: pve_gre_unit
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00
- name: Reload systemd
systemd: daemon_reload=True
when: pve_gre_unit.changed
2022-03-07 16:00:05 +01:00
tags: pve
2021-12-01 19:13:34 +01:00