mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-26 23:23:22 +02:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
![]() |
---
|
||
|
|
||
|
- name: Install packages
|
||
|
package: name={{ linctl_packages }}
|
||
|
tags: drbd
|
||
|
|
||
|
- name: Custimize systemd unit
|
||
|
copy:
|
||
|
content: |
|
||
|
[Service]
|
||
|
#User=linstor-controller
|
||
|
#Group=linstor-controller
|
||
|
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
|
||
|
|
||
|
- name: Reload systemd
|
||
|
systemd: daemon_reload=True
|
||
|
when: linctl_unit.changed or (linctl_data_unit is defined and linctl_data_unit.changed)
|
||
|
tags: drbd
|