Skip to content

Commit d2eba9c

Browse files
committed
(GH-477) Add Bolt yaml support
This commit adds the necessary syntax, grammer, and snippet files to provide support for editing Bolt yaml files.
1 parent 567f787 commit d2eba9c

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128
{
129129
"language": "puppetfile",
130130
"path": "./snippets/puppetfile.snippets.json"
131+
},
132+
{
133+
"language": "yaml",
134+
"path": "./snippets/bolt.snippets.json"
131135
}
132136
],
133137
"commands": [

snippets/bolt.snippets.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"Bolt Config template": {
3+
"prefix": "bolt-config",
4+
"description": "A complete Bolt config template structure snippet",
5+
"body": [
6+
"modulepath: ${1:modulePath}",
7+
"inventoryFile: ${2:inventoryFile}",
8+
"concurrency: ${3:10}",
9+
"format: ${4|human,json|}",
10+
"color: ${6|true,false|}",
11+
"\t${7|ssh,wirnm|}:${0}"
12+
]
13+
},
14+
"Bolt Inventory template": {
15+
"prefix": "bolt-inventory",
16+
"description": "A complete Bolt inventory template structure snippet",
17+
"body": [
18+
"groups:",
19+
"- name: ${1:groupName}",
20+
"\tgroups:",
21+
"\t\t- name: ${2:nodeGroupName1}",
22+
"\t\t\tnodes:",
23+
"\t\t\t\t- ${3:node1}",
24+
"\t\t- name: ${4:nodeGroupName2}",
25+
"\t\t\tnodes:",
26+
"\t\t\t\t- ${5:node2}",
27+
"\tconfig:",
28+
"\t\ttransport: ${6|ssh,wirnm|}",
29+
"\t\t${6|ssh,wirnm|}:${0}"
30+
]
31+
},
32+
"Bolt Inventory groups": {
33+
"prefix": "groups",
34+
"description": "Adds new root group",
35+
"body": [
36+
"groups:",
37+
" - name: ${1:groupName}"
38+
]
39+
},
40+
"Bolt Inventory node": {
41+
"prefix": "node",
42+
"description": "Adds new node",
43+
"body": [
44+
"- name: ${1:nodeName}",
45+
" config:",
46+
" transport: ${2|ssh,wirnm|}",
47+
" ${2|ssh,wirnm|}:${0}"
48+
]
49+
},
50+
"Bolt WinRM Transport template": {
51+
"prefix": "winrm",
52+
"description": "",
53+
"body": [
54+
"winrm:",
55+
" user: ${1:userName}",
56+
" password: ${2:passwd}",
57+
" ssl: ${3|true,false|}${0}"
58+
]
59+
},
60+
"Bolt SSH Transport template": {
61+
"prefix": "ssh",
62+
"description": "",
63+
"body": [
64+
"ssh:${0}"
65+
]
66+
}
67+
}

0 commit comments

Comments
 (0)