-
Notifications
You must be signed in to change notification settings - Fork 6
/
community.general.code-snippets
156 lines (156 loc) · 5.77 KB
/
community.general.code-snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"Community.General.Alternatives": {
"prefix": [
"community.general.alternatives",
"alternatives"
],
"body": [
"- name: ${1:Description}",
" community.general.alternatives:",
" name: \"${2:generic_link_name}\"",
" path: \"${3:path_to_real_executable}\"${4:",
" link: \"${5:path_to_symllink_for_real_executable}\"}",
"$0"
],
"description": "Used for Ansible alternatives",
"scope": "ansible"
},
"Commmunity.General.Archive": {
"prefix": [
"community.general.archive"
],
"body": [
"- name: ${1:Description}",
" community.general.archive:",
" dest: \"${2:path_to_save_archive_to}\"",
" force_archive: ${3|true,false|}",
" format: ${4|zip,gz,bz2,tar,zx|}",
" owner: \"${5:owner}\"",
" group: \"${6:group}\"",
" mode: \"${7:0700}\"",
" path:",
" - ${8:file_or_dir_to_archive}",
" ${9:exclude_path}",
" ${20:- path_to_exclude}}",
"$0"
],
"description": "Used for Ansible Archive Module to package files together",
"scope": "ansible"
},
"Commmunity.General.Discord_FromEnv": {
"prefix": [
"community.general.discord"
],
"body": [
"- name: ${1:Description}",
" community.general.discord:",
" webhook_id: {{ lookup('env', 'DISCORD_ID') }}",
" webhook_token: {{ lookup('env', 'DISCORD_TOKEN') }}",
" content: \"${2:my_message_to_discord}\"",
"$0"
],
"description": "Used for Ansible Discord Integration",
"scope": "ansible"
},
"Community.General.DjangoManage": {
"prefix": [
"community.general.django_manage"
],
"body": [
"- name: ${1:Description}",
" community.general.django_manage:",
" command: \"${2|cleanup,collectstatic,createcachetable,flush,loaddata,migrate,syncdb,test,validate|}\"",
" project_path: \"${4:project_dir}\"",
" ${5:virtualenv: \"${6:virtenv_path}\"}",
" ${7:database: \"${8:db_name}\"}",
"$0"
],
"description": "Used for Ansible Django Manage to do Django functions",
"scope": "ansible"
},
"Community.General.Modprobe": {
"prefix": [
"community.general.modprobe"
],
"body": [
"- name: ${1:Description}",
" community.general.modprobe:",
" name: \"${2:kernel_module}\"",
" state: ${3|present,absent|}",
" ${4:params: \"${5:module_params}\"}",
"$0"
],
"description": "Used for Ansible ModProbe Module",
"scope": "ansible"
},
"Community.General.Snap": {
"prefix": [
"community.general.snap"
],
"body": [
"- name: ${1:Description}",
" community.general.snap:",
" name: \"${2:snap_to_add}\"",
" state: ${3|present,absent,enabled,disabled|}",
" classic: ${4|true,false|}",
" ${5:channel: \"${6:release_version}\"}",
"$0"
],
"description": "Used for Ansible Snap Module",
"scope": "ansible"
},
// Originally I was going to make this selectable, but there are 608 Timezones... so no.
"Commmunity.General.Timezone": {
"prefix": [
"community.general.timezone",
"timezone"
],
"body": [
"- name: ${1:Description}",
" community.general.timezone:",
" name: ${2:America/New_York}",
"$0"
],
"description": "Used for Ansible Timezone Module to set host timezone",
"scope": "ansible"
},
"Community.General.Zypper": {
"prefix": [
"community.general.zypper",
"zypper"
],
"body": [
"- name: ${1:Description}",
" community.general.zypper:",
" name:",
" - ${2:package_name}",
" state: ${3|present,absent,latest,installed,removed|}",
" disable_gpg_check: ${5|true,false|}",
" update_cache: ${7|true,false|}",
" validate_certs: ${8|true,false|}",
"$0"
],
"description": "Used for Ansible Community General Zypper module to manage packages with Zypper",
"scope": "ansible"
},
"Community.General.Zypper_Repository": {
"prefix": [
"community.general.zypper_repository",
"zypper_repository"
],
"body": [
"- name: Add Repository for ${1:RepoName}",
" community.general.zypper_repository:",
" name: ${1:RepoName}",
" description: ${2:Description}",
" repo: ${3:RepoUrl}",
" state: ${4|present,absent|}",
" enabled: ${5|true,false|}",
" autorefresh: ${6|true,false|}",
" auto_import_keys: ${7|true,false|}",
"$0"
],
"description": "Used for Ansible Community General Zypper module to manage repositories with Zypper",
"scope": "ansible"
},
}