Skip to content

Commit

Permalink
Document how to use Ansible on Windows (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristgit authored Apr 28, 2024
1 parent 9132a80 commit a5bba91
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ This folder contains Ansible roles which are used to configure out bare metal se

## Local Environment Setup

To setup a local environment using VMs for testing, [Read here](./local_testing/README.md)
If you are on Windows, you need to install WSL and run Ansible in there, as
[Ansible cannot run on Windows hosts
natively](https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html#can-ansible-run-on-windows).
Debian Stable is recommended, but any Linux distribution should work.

1. Create a virtual environment: `python -m venv venv`
1. Activate the virtual environment
- Windows: `.\venv\Scripts\activate`
- Note: [Ansible cannot run on Windows hosts natively](https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html#can-ansible-run-on-windows)
- Unix: `source venv/bin/activate`
1. Update pip and builder deps: `python -m pip install --upgrade pip wheel setuptools`
1. Install project dependencies: `python -m pip install -r requirements.txt`
1. Install the pre-commit hook: `pre-commit install`
1. Create a `vault_passwords` file and write the vault password to it
1. Configure the Ansible Vault git diff driver using `git config --global
diff.ansible-vault.textconv "ansible-vault view"` and `git config diff.ansible-vault.cachetextconv false`

## Testing on Virtual machines

To setup a local environment using VMs for testing, [see the `local_testing`
directory](./local_testing/README.md).

0 comments on commit a5bba91

Please sign in to comment.