Updated Pull-ViaAnsible to allow Path

it's also a OneLiner output by default
This commit is contained in:
lksz 2021-01-15 02:24:53 -05:00
parent a7ac392886
commit 1b62fd1114
1 changed files with 9 additions and 2 deletions

View File

@ -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())