From 6b40c8d8aa133ce7d99ba65e70b62d517813aee3 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 19 Jul 2020 17:53:41 +0200 Subject: [PATCH] nfs/export: Use systemd_escape_mount instead of custom regex_replace --- roles/nfs/export/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nfs/export/defaults/main.yml b/roles/nfs/export/defaults/main.yml index f6953ee..efc1958 100644 --- a/roles/nfs/export/defaults/main.yml +++ b/roles/nfs/export/defaults/main.yml @@ -4,7 +4,7 @@ export_name: "{{ real_path | basename }}" # real_path: "/exported/path" export_path: "{{ global_nfs_directory }}/{{ export_name }}" export_config_name: "{{ export_name | regex_replace('/', '-') }}" -mount_unit_name: "{{ export_path | regex_replace('^/') | regex_replace('/', '-') }}.mount" +mount_unit_name: "{{ export_path | systemd_escape_mount }}" export_hosts: - "*"