Ansible调用win_domain_user模块及AD服务器hosts文件自动化更新问题
问题与需求
我尝试在Ansible中运行community.windows.win_domain_user模块,当前使用的Playbook如下:
--- - name: connect to windows server hosts: win connection: ssh gather_facts: no vars: ansible_connection: ssh ansible_shell_type: cmd tasks: - name: Ensure user bob is present with address information community.windows.win_domain_user: name: Bob.c firstname: Bob lastname: Carrender groups: - Users domain_username: testing.com\bob.c domain_password: SomePas2w0rd domain_server: testing.com
环境信息
- 包含更新后AD服务器信息的CSV文件存储在Ubuntu机器上
- 需要用该CSV信息更新网格内Windows服务器的hosts文件
- Ubuntu机器可通过SSH访问所有网格内Windows服务器,SSH连接采用密码指纹认证
- Ubuntu机器可成功运行其他Windows Playbook
- Windows服务器已更新本地网络策略以启用各类加密会话
执行输出截图

核心需求
希望自动化完成网格内多台服务器hosts文件中AD服务器信息的更新操作。
内容的提问来源于stack exchange,提问作者Tim Carrender
相关产品推荐
相关产品推荐

