我正在尝试使用此剧本在Microsoft DNS服务器中注册CNAME:
- hosts: windns
remote_user: "{{ lookup('env', 'USER') }}@MYDOMAIN.COM"
tasks:
- name: Create alias
win_dns_record:
computer_name: "{{ inventory_hostname }}"
name: "myalias"
type: "CNAME"
value: "myhost.mydomain.com"
zone: "MYDOMAIN.COM"
state: present
我在收集事实时遇到这个错误:An error (1332) occurred while enumerating the group membership. The member's SID could not be resolved.
$ ansible-playbook --check dns_alias.yml --ask-vault-pass -k
SSH password:
Vault password:
PLAY [windns] ***********************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************
fatal: [windns]: FAILED! => {"ansible_facts": {}, "changed": false, "msg": "The following modules failed to execute: setup\n setup: Unhandled exception while executing module: An error (1332) occurred while enumerating the group membership. The member's SID could not be resolved.\n"}
PLAY RECAP ******************************************************************************************************************************
windns : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
如果我放置gather_fatcs: false
,它将有效。
编辑:未创建CNAME。
有任何提示吗?