2022-08-29 11:00:17 +02:00
---
- name : Install packages
package : name={{ linctl_packages }}
tags : drbd
- name : Custimize systemd unit
copy :
content : |
[ Service]
#User=linstor-controller
#Group=linstor-controller
2022-12-14 18:00:12 +01:00
# Empty the error database on startup, to prevent unbounded growth
ExecStartPre=/bin/rm -f /var/log/linstor-controller/error-report.mv.db
2022-08-29 11:00:17 +02:00
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
SyslogIdentifier=linstor-controller
Restart=on-failure
StartLimitInterval=0
RestartSec=15
dest : /etc/systemd/system/linstor-controller.service.d/99-ansible.conf
notify : restart linstor-controller
register : linctl_unit
tags : drbd
- name : Install mount unit
copy :
content : |
[ Unit]
Description=Filesystem for the LINSTOR controller
[ Mount]
# you can use the minor like /dev/drbdX or the udev symlink
What=/dev/drbd/by-res/{{ linctl_ha_res }}/0
Where=/var/lib/linstor
dest : /etc/systemd/system/var-lib-linstor.mount
register : linctl_data_unit
when : linctl_ha
tags : drbd
2022-12-14 18:00:12 +01:00
- name : Install controller logs janitor
template : src=linstor-controller-logs-janitor.{{ item }}.j2 dest=/etc/systemd/system/linstor-controller-logs-janitor.{{ item }}
loop :
- service
- timer
notify : restart linstor-controller-logs-janitor
register : linctl_janitor_unit
tags : drbd
2022-08-29 11:00:17 +02:00
- name : Reload systemd
systemd : daemon_reload=True
2022-12-14 18:00:12 +01:00
when : linctl_unit.changed or (linctl_data_unit is defined and linctl_data_unit.changed) or linctl_janitor_unit.results | selectattr('changed','equalto',True) | list | length > 0
2022-08-29 11:00:17 +02:00
tags : drbd
2022-08-30 23:00:16 +02:00
- name : Install backup hooks
template : src={{ item }}-backup.j2 dest=/etc/backup/{{ item }}.d/linstor mode=755
loop :
- pre
- post
tags : drbd