Systemd mounts for auto02
This commit is contained in:
62
roles/backup_server/tasks/main.yaml
Normal file
62
roles/backup_server/tasks/main.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
- name: Generate Automounts
|
||||
include_role:
|
||||
name: alysoid.ansible-systemd-mount
|
||||
vars:
|
||||
catena_mount:
|
||||
- name: Mount {{ mount_point }}
|
||||
options:
|
||||
Mount:
|
||||
What: /dev/backup/{{ mount_point }}
|
||||
Where: /backup/{{ mount_point }}
|
||||
Type: btrfs
|
||||
Options: defaults,compress=lzo,space_cache=v2
|
||||
Unit:
|
||||
After: network.target
|
||||
Install:
|
||||
WantedBy: network.target
|
||||
catena_automount:
|
||||
- name: Automount {{ mount_point }}
|
||||
options:
|
||||
Automount:
|
||||
Where: /backup/{{ mount_point }}
|
||||
TimeoutIdleSec: 30
|
||||
Unit:
|
||||
After: network.target
|
||||
Install:
|
||||
WantedBy: network.target
|
||||
loop:
|
||||
- yori
|
||||
- lenny
|
||||
- auto
|
||||
- maketank
|
||||
- truhe
|
||||
loop_control:
|
||||
loop_var: mount_point
|
||||
|
||||
|
||||
|
||||
# [Unit]
|
||||
# Description=Automount /backup/yori
|
||||
# After=network.target
|
||||
|
||||
# [Automount]
|
||||
# Where=/backup/yori
|
||||
# TimeoutIdleSec=30
|
||||
|
||||
# [Install]
|
||||
# WantedBy=network.target
|
||||
# [Unit]
|
||||
# Description=Mount /backup/yori
|
||||
# After=network.target
|
||||
# #Requires=backup-yori.automount
|
||||
# #After=backup-yori.automount
|
||||
|
||||
# [Mount]
|
||||
# What=/dev/backup/yori
|
||||
# Where=/backup/yori
|
||||
# Type=btrfs
|
||||
# Options=defaults,compress=lzo,space_cache=v2
|
||||
|
||||
# [Install]
|
||||
# WantedBy=network.target
|
||||
@@ -58,10 +58,6 @@
|
||||
include_role:
|
||||
name: sudo
|
||||
|
||||
#- name: autofs for Linux
|
||||
# include_role:
|
||||
# name: autofs
|
||||
#
|
||||
# Set vm.swappiness to 5 in /etc/sysctl.conf
|
||||
- sysctl:
|
||||
name: vm.swappiness
|
||||
|
||||
31
roles/file_server/tasks/main.yaml
Normal file
31
roles/file_server/tasks/main.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
- name: Generate Automounts
|
||||
include_role:
|
||||
name: alysoid.ansible-systemd-mount
|
||||
vars:
|
||||
catena_mount:
|
||||
- name: Mount {{ mount_point }}
|
||||
options:
|
||||
Mount:
|
||||
What: /dev/vg01/{{ mount_point }}
|
||||
Where: /srv/{{ mount_point }}
|
||||
Type: btrfs
|
||||
Options: defaults,compress=lzo,space_cache=v2
|
||||
Unit:
|
||||
After: network.target
|
||||
Install:
|
||||
WantedBy: network.target
|
||||
catena_automount:
|
||||
- name: Automount {{ mount_point }}
|
||||
options:
|
||||
Automount:
|
||||
Where: /srv/{{ mount_point }}
|
||||
TimeoutIdleSec: 90
|
||||
Unit:
|
||||
After: network.target
|
||||
Install:
|
||||
WantedBy: smb.service
|
||||
loop:
|
||||
- pub
|
||||
loop_control:
|
||||
loop_var: mount_point
|
||||
Reference in New Issue
Block a user