diff options
author | jkito <jkito@github> | 2022-11-20 16:14:59 +0530 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2023-02-21 17:38:06 +0100 |
commit | d1062760fc52023fd031a8c8d768d2c63913ff54 (patch) | |
tree | 56c4b126fcbb79871b118bde5e1d87560ecec4c1 | |
parent | a38a558b851eac14d862a01e2e72c36d5f2385f3 (diff) |
[build] Add README for windows build env setup playbook
-rw-r--r-- | scripts/ansible/windows/README.md | 40 |
1 files changed, 40 insertions, 0 deletions
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=<path_to_ssh_key> +``` |