Configure Windows to be Managed via Ansible as a client
Run On Windows Ansible Client Machine
https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
Run On Linux Ansible Management Server
ansible-galaxy collection install ansible.windows
ansible-galaxy collection install community.windows
Configure Group Var
---
ansible_user: "administrator"
ansible_password: "supersecretpassword"
ansible_port: "5986"
ansible_connection: "winrm"
ansible_winrm_transport: "basic"
ansible_winrm_server_cert_validation: ignore
become_method: runas
Sample Run Book Syntax
ansible-playbook main.yml
Related
Links
- https://docs.ansible.com/ansible/2.7/user_guide/windows.html
- https://docs.ansible.com/ansible/latest/collections/community/windows/index.html
- https://docs.ansible.com/ansible/latest/collections/ansible/windows/
- https://docs.ansible.com/ansible/latest/index.html
- https://docs.ansible.com/ansible/latest/user_guide/index.html
- https://docs.ansible.com/ansible/2.7/modules/list_of_all_modules.html