重构架构
This commit is contained in:
29
data/tmpls/services/autofs.yaml
Normal file
29
data/tmpls/services/autofs.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
description: AutoFS server for SunHPC clusters
|
||||
copyright: |
|
||||
Copyright (c) 2026 SunHPC Project.
|
||||
Licensed under Apache 2.0.
|
||||
|
||||
stages:
|
||||
post:
|
||||
- type: file
|
||||
path: /etc/auto.master
|
||||
content: |
|
||||
/share /etc/auto.share --timeout=1200
|
||||
/home /etc/auto.home --timeout=1200
|
||||
|
||||
- type: file
|
||||
path: /etc/auto.share
|
||||
content: |
|
||||
apps {{ .Node.Hostname }}.{{ .Cluster.Domain }}:/export/&
|
||||
|
||||
- type: script
|
||||
content: |
|
||||
mkdir -p /export/apps
|
||||
echo "AutoFS 配置已生成"
|
||||
|
||||
configure:
|
||||
- type: script
|
||||
condition: "{{ if .Node.OldHostname }}true{{ end }}"
|
||||
content: |
|
||||
sed -i 's/{{ .Node.OldHostname }}/{{ .Node.Hostname }}/g' /etc/auto.share
|
||||
systemctl restart autofs
|
||||
Reference in New Issue
Block a user