17 lines
566 B
YAML
17 lines
566 B
YAML
---
|
|
- name: "set local variables from overrides and defaults"
|
|
set_fact:
|
|
storage_mount: "{{ (storage_mount_defaults | combine(storage_mount_override, recursive=True)) if storage_mount_override else storage_mount_defaults }}"
|
|
|
|
- name: get final escaped name
|
|
command: "systemd-escape --suffix=mount --path {{ storage_mount.dest_path }}"
|
|
register: escaped_mount_path
|
|
|
|
- block:
|
|
- name: template nsf.service
|
|
template:
|
|
stc: nfs.service.j2
|
|
path: "/etc/systemd/system/{{ escaped_mount_path.stdout }}"
|
|
when:
|
|
- "'nfs' in storage_mount.type"
|