Kenneth Benzie (Benie) 06b511d823 Set the owner of Git repos on Windows
The `win_git` module clones repos as the current user, which since its
an admin login is the admin. This patch adjusts the `win_owner` to so
that repos are owned by the correct user when being used in a non-admin
capacity.
2022-09-10 16:18:21 +01:00

44 lines
1.0 KiB
YAML

---
- set_fact:
powershell_config_dir:
'{{ansible_env.USERPROFILE}}/Documents/WindowsPowerShell'
- name: clone config repos
win_git:
repo: git@code.infektor.net:config/WindowsPowerShell.git
dest: '{{powershell_config_dir}}'
branch: master
- win_owner:
path: '{{powershell_config_dir}}'
user: Benie
- name: install chocolatey package
win_chocolatey:
name: Cmder
state: latest
- name: get NuGet package provider
ansible.windows.win_powershell:
script:
Get-PackageProvider -Name NuGet
changed_when: false
register: nuget_package_provider
- name: install NuGet package provider
when: nuget_package_provider.error | length > 0
ansible.windows.win_powershell:
script: |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
- name: install PsReadline module
win_psmodule:
name: PsReadline
state: latest
accept_license: true
- name: install posh-git module
win_psmodule:
name: posh-git
state: latest
accept_license: true