use a var for the nfs service name and adjust the value for azl2023

This commit is contained in:
bmeehan
2023-07-21 20:42:29 +10:00
parent 7baea6b580
commit 35df63687d
3 changed files with 5 additions and 8 deletions

View File

@@ -3,3 +3,4 @@
atl_nfs_server_device: "{{ lookup('env', 'ATL_NFS_SERVER_DEVICE') }}"
atl_nfs_fs_type: "{{ lookup('env', 'ATL_NFS_FS_TYPE') or 'xfs' }}"
atl_nfs_fs_label: "{{ lookup('env', 'ATL_NFS_FS_LABEL') or 'BB-Shared' }}"
atl_nfs_service_name: "nfs.service"

View File

@@ -2,5 +2,5 @@
- name: Restart NFS
ansible.builtin.service:
name: "nfs.service"
name: "{atl_nfs_service_name}"
state: restarted

View File

@@ -5,10 +5,6 @@
name:
- nfs-utils
- name: Create nfs.service symlink to nfs-server.service
ansible.builtin.file:
src: /usr/lib/systemd/system/nfs-server.service
dest: /usr/lib/systemd/system/nfs.service
owner: root
group: root
state: link
- name: set nfs service name to nfs-server.service
ansible.builtin.set_fact:
atl_nfs_service_name: "nfs-server.service"