Add wsl role to when WSL is detected in kernel name
This role sets up the non-standard `win_git:` module for use when managing a Windows host from within WSL on the same system.
This commit is contained in:
21
roles/wsl/tasks/main.yaml
Normal file
21
roles/wsl/tasks/main.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: create external directory
|
||||
file:
|
||||
dest: external
|
||||
state: directory
|
||||
- name: clone ansible win_git module
|
||||
git:
|
||||
repo: https://github.com/tivrobo/ansible-win_git.git
|
||||
dest: external/ansible-win_git
|
||||
version: master
|
||||
- name: create ansible modules directory
|
||||
file:
|
||||
dest: ~/.ansible/plugins/modules
|
||||
state: directory
|
||||
- name: copy win_git files to ansible modules directory
|
||||
copy:
|
||||
src: '~/.config/local/external/ansible-win_git/{{item}}'
|
||||
dest: '~/.ansible/plugins/modules/{{item}}'
|
||||
with_items:
|
||||
- win_git.ps1
|
||||
- win_git.py
|
||||
Reference in New Issue
Block a user