diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5446323 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +external diff --git a/main.yaml b/main.yaml index fc65f36..3725874 100644 --- a/main.yaml +++ b/main.yaml @@ -6,6 +6,8 @@ - role: neovim - role: git - role: python + - role: wsl + when: '"WSL" in ansible_kernel' - hosts: windows roles: diff --git a/roles/wsl/tasks/main.yaml b/roles/wsl/tasks/main.yaml new file mode 100644 index 0000000..f761ea5 --- /dev/null +++ b/roles/wsl/tasks/main.yaml @@ -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