From 1b62fd111478ae5d275a3d28d52b01d340e5b9bd Mon Sep 17 00:00:00 2001 From: lksz Date: Fri, 15 Jan 2021 02:24:53 -0500 Subject: [PATCH] Updated Pull-ViaAnsible to allow Path it's also a OneLiner output by default --- ansible/Pull-ViaAnsible.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ansible/Pull-ViaAnsible.ps1 b/ansible/Pull-ViaAnsible.ps1 index 8b53770..df5de70 100644 --- a/ansible/Pull-ViaAnsible.ps1 +++ b/ansible/Pull-ViaAnsible.ps1 @@ -1,3 +1,10 @@ -[CmdletBinding()]param([string[]]$Remotes = 'All') +[CmdletBinding()]param( + [Parameter(mandatory)] + [string]$RemotePath, + [switch]$NotOneLine, + [string[]]$Remotes = 'All' +) + +Invoke-ViaAnsible -Command "cd $RemotePath",'Write-Output "$PWD `t"','git pull' -Remotes:$($Remotes.ToLower()) -OneLine:$(-not $NotOneLine) + -Invoke-ViaAnsible -Command "git pull" -Remotes:$($Remotes.ToLower())