Last active
September 11, 2019 07:42
-
-
Save changbowen/c824bc257287cfb8c4f7e69d1f01c3bb to your computer and use it in GitHub Desktop.
VS Code Ansible snippets
This file contains hidden or 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
| { | |
| "Insert new variable": { | |
| "prefix": ": ", | |
| "body": [ | |
| ": \"{{ ${2:value} }}\"$0" | |
| ], | |
| "description": "Insert new ansible variable" | |
| }, | |
| "Insert conditional list": { | |
| "prefix": "cond", | |
| "body": [ | |
| "", | |
| "\t\"{{ '[' +", | |
| "\t\t(('\\\"' + ${1:variable1} + '\\\",') if (${1:variable1} | d('',true) | length > 0) else '') +", | |
| "\t\t(('\\\"' + ${2:variable2} + '\\\",') if (${2:variable2} | d('',true) | length > 0) else '') +", | |
| "\t']' }}\"$0" | |
| ], | |
| "description": "Insert conditional list" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment