在使用win_dsc模块在ansible中创建磁盘分区时,resource_name出现错误:
- name: Drive config
win_dsc:
resource_name: Disk
DriveLetter: "{{ drive_letter }}"
DiskId: "{{ disknumber }}"
FsLabel: "{{ fslabel }}"
FsFormat: "{{ fsformat }}"
使用Disk
作为资源类型会返回此错误:
"changed": false,
"msg": "Resource 'Disk' not found."
到目前为止,我没有运气获得用于创建磁盘驱动器的实际resource_name。