justin_p.wincom
ansible-role-wincom
This role helps make common tasks easier when setting up a Windows host.
Works with
- Server 2019
- Server 2016
- Server 2012R2
- Server 2012
Not tested (yet) on:
- Server 2008R2
- Server 2008-x64
- Server 2008-x86
Requirements
- You need
python3-winrm
(pywinrm
) 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 start later. | [WinRM] |
wincom_power_plan | The desired settings for the Windows power plan. | "high performance" |
wincom_dns_nics | Which NIC to update DNS on. | "*" |
wincom_dns_server | DNS servers to set on the NICs. | [8.8.8.8, 8.8.4.4] |
wincom_hostname | Change the system's hostname to this value. | "{{ inventory_hostname }}" |
Dependencies
- WinRM on the Windows host must be set up 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 to create a local Windows Server 2019 VM in Virtualbox. After the VM is created, it will automatically run our role.
Development requirements
Run pip3 install pywinrm
Usage
- Use
vagrant up
to create a VM and run our playbook. - Use
vagrant provision
to reapply our playbook. - Use
vagrant destroy -f && vagrant up
to recreate the VM and run our playbook. - Use
vagrant destroy
to remove the VM.
License
MIT
Authors
- Justin Perdok (@justin-p), Orange Cyberdefense
Contributing
Feel free to report issues, contribute, and submit your Pull Requests. You can also reach out to me on Twitter (@JustinPerdok).
Informazioni sul progetto
This role helps simplifying some basis common tasks for a windows host deployment.
Installa
ansible-galaxy install justin_p.wincom
Licenza
mit
Download
269
Proprietario
IT Geek, Ethical Hacker, DevOps Nut, PowerShell Fanatic and lover of beers :beers: