From d1062760fc52023fd031a8c8d768d2c63913ff54 Mon Sep 17 00:00:00 2001 From: jkito Date: Sun, 20 Nov 2022 16:14:59 +0530 Subject: [build] Add README for windows build env setup playbook --- scripts/ansible/windows/README.md | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 scripts/ansible/windows/README.md diff --git a/scripts/ansible/windows/README.md b/scripts/ansible/windows/README.md new file mode 100644 index 0000000..f28350d --- /dev/null +++ b/scripts/ansible/windows/README.md @@ -0,0 +1,40 @@ +## Ansible playbook to setup Dev env for Bitmask VPN development + +### Prerequisites + +On the target windows host, we need SSH access to be enabled, default shell for SSH should be PowerShell and the user account used for Ansible should be an administrator user. + +- To enable OpenSSH on windows follow the [Install OpenSSH for Windows](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell#install-openssh-for-windows)guide. + +- To set `PowerShell` as the default shell for OpenSSH, follow the [OpenSSH Server Configuration](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration) guide. + +- Then to enable key based access follow the [OpenSSH Key Management Guide](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement) + +The playbook has been tested to work with Windows 10. + +### Playbook organisation + +``` +├── inventory.yaml # Example inventory file +├── requirements.yaml # Collection and roles the playbook uses +├── site.yaml # Playbook +``` + +It currently installs Chocolatey, Qt and Qt Installer FW on the target host apart from the various development tools installed from Chocolatey + +For installing Chocolatey and packages from it we make use of the [`chocolatey.chocolatey.win_chocolatey`](https://docs.ansible.com/ansible/latest/collections/chocolatey/chocolatey/win_chocolatey_module.html) module. +The included `inventory` file is just an example file for easy testing during development + +### How to run the playbook + +Install the required collections and modules from ansible-galaxy: + +``` +$ ansible-galaxy collection install -r requirements.yaml +``` + +Make sure you have a valid inventory file, update the provided `inventory.yaml` file with your VM or remote host's IP address and run: + +``` +$ ansible-playbook -i inventory.yaml site.yaml --private-key= +``` -- cgit v1.2.3