我是盐堆的新手。
我正在尝试确保存在符号链接。
/etc/localtime:
file.symlink:
- target: /usr/share/zoneinfo/Europe/Paris
- file.exists:
- name: /usr/share/zoneinfo/Europe/Paris
当不存在时,结果是例外/etc/localtime
,或者当/etc/localtime
已经是符号链接时。但是当/etc/localtime
是常规文件时它会失败:
----------
State: - file
Name: /etc/localtime
Function: symlink
Result: False
Comment: File exists where the symlink /etc/localtime should be
Changes:
我不知道如何对状态进行编码,以便在创建链接之前删除文件。有什么线索吗?
干杯,皮埃尔