https://github.com/justin-p/ansible-role-wincom
This role helps simplifying some basic common tasks for a windows host deployment with Ansible.
https://github.com/justin-p/ansible-role-wincom
ansible ansible-playbook ansible-role common hacktoberfest microsoft windows
Last synced: 11 months ago
JSON representation
This role helps simplifying some basic common tasks for a windows host deployment with Ansible.
- Host: GitHub
- URL: https://github.com/justin-p/ansible-role-wincom
- Owner: justin-p
- License: mit
- Created: 2020-04-07T16:11:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T19:57:36.000Z (over 2 years ago)
- Last Synced: 2025-07-12T13:27:01.480Z (12 months ago)
- Topics: ansible, ansible-playbook, ansible-role, common, hacktoberfest, microsoft, windows
- Homepage:
- Size: 40 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-role-wincom
[](https://galaxy.ansible.com/justin_p/wincom)
[](https://github.com/justin-p/ansible-role-wincom/actions)
This role helps simplifying some basis common tasks for a windows host deployment.
Works on
- Server 2019
- Server 2016
- Server 2012R2
- Server 2012
Not tested (yet) on:
- Server 2008R2
- Server 2008-x64
- Server 2008-x86
## Requirements
- `python3-winrm` (`pywinrm`) is needed for WinRM.
## Role Variables
`defaults/main.yml`
| Variable | Description | Default value |
| :----------------------- | :----------------------------------------------- | :------------------------------------------------------------------- |
| wincom_required_psmodule | Powershell modules that should be installed. | [xPSDesiredStateConfiguration, NetworkingDsc, ComputerManagementDsc] |
| wincom_service_delayed | Services that should have delayed startup. | [WinRM] |
| wincom_power_plan | The desired settings of the windows power plan. | "high performance" |
| wincom_dns_nics | On what NIC should we update DNS. | "\*" |
| wincom_dns_server | The DNS servers to configure on the NICs. | [8.8.8.8, 8.8.4.4] |
| wincom_hostname | Change the hostname of the system to this value. | "{{ inventory_hostname }}" |
## Dependencies
- WinRM on the windows host should configured for Ansible.
- justin_p.posh5
## Example Playbook
- hosts: windowshosts
roles:
- role: justin_p.posh5
- role: justin_p.wincom
## Local Development
This role includes a Vagrantfile that will spin up a local Windows Server 2019 VM in Virtualbox.
After creating the VM it will automatically run our role.
### Development requirements
`pip3 install pywinrm`
#### Usage
- Run `vagrant up` to create a VM and run our playbook
- Run `vagrant provision` to reapply our playbook
- Run `vagrant destroy -f && vagrant up` to recreate the VM and run our playbook.
- Run `vagrant destroy` to remove the VM.
## License
MIT
## Authors
- Justin Perdok ([@justin-p](https://github.com/justin-p/)), Orange Cyberdefense
## Contributing
Feel free to open issues, contribute and submit your Pull Requests. You can also ping me on Twitter ([@JustinPerdok](https://twitter.com/JustinPerdok)).