Created
May 17, 2021 16:52
-
-
Save maravedi/a7769d10f11e6090f7866db8d6039c6b to your computer and use it in GitHub Desktop.
Ansible Variable File to CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Content .\main.yml | Where-Object { $_ -and ($_ -notmatch "^\s*(\-|#)" )} | Foreach-Object { ($_ -Split ": ") -Join ','} | ConvertFrom-CSV -Header Name, DefaultVaue | ConvertTo-CSV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment