-
Notifications
You must be signed in to change notification settings - Fork 18
/
plugin_1_4.yaml
500 lines (481 loc) · 16.9 KB
/
plugin_1_4.yaml
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
plugins:
ansible:
executor: central_deployment_agent
package_name: cloudify-ansible-plugin
package_version: '3.2.8'
dsl_definitions:
ansible_install_config: &install_config
use_existing_resource:
type: boolean
description: If true, use an existing ansible installation rather than installing it
default: false
installation_source:
type: string
default: 'ansible==4.10.0'
description: Location to download the Ansible executable binary from. Ignored if 'use_existing' is true.
extra_packages:
type: list
default: []
description: >
List of python packages to install on controller virtual env before running the playbook.
If the manager has no internet connection this feature cannot be used.
galaxy_collections:
type: list
default: []
description: >
List of Ansible galaxy collections to install on controller virtual env before running the playbook.
If the manager has no internet connection this feature cannot be used.
ansible_external_venv:
type: string
default: ""
description: >
Ansible python venv with previously installed ansible and extra packages
ansible_playbook_executable_path:
type: string
default: ""
description: >
A full path to your ansible_playbook executable if user don't want to
use the included version of executable in the plugin
playbook_config: &playbook_config
ansible_external_venv:
type: string
default: ""
description: >
Ansible python venv with previously installed ansible and extra packages
ansible_playbook_executable_path:
type: string
default: ""
description: >
A full path to your ansible_playbook executable if user don't want to
use the included version of executable in the plugin
extra_packages:
type: list
default: []
description: >
List of python packages to install on controller virtual env before running the playbook.
If the manager has no internet connection this feature cannot be used.
galaxy_collections:
type: list
default: []
description: >
List of Ansible galaxy collections to install on controller virtual env before running the playbook.
If the manager has no internet connection this feature cannot be used.
roles:
type: list
default: []
description: >
List of roles to install on controller virtual env before running the playbook.
If the manager has no internet connection this feature cannot be used.
module_path:
type: string
default: ''
description: >
The location on the Cloudify Manager file system where
Ansible modules are expected to be installed or will be installed.
The default value is empty and if so, this will be created automatically
during the environment setup. The cloudify-ansible-ctx module will be
installed by default.
playbook_source_path:
type: string
default: ""
description: >
A full path/URL that contain playbook specified in playbook_path
or site_yaml_path.
playbook_path:
type: string
default: ""
description: >
A path to your `site.yaml` or `main.yaml` in your
Ansible Playbook relative to blueprint or playbook_source_path
if playbook_source_path is URL to archive File relative inside the archive.
site_yaml_path:
type: string
default: ""
description: >
DEPRECATED.
A path to your `site.yaml` or `main.yaml` in your
Ansible Playbook relative to blueprint or playbook_source_path
if playbook_source_path is URL to archive File relative inside the archive.
additional_playbook_files:
type: list
default: []
description: >
A list of string paths blueprint resources that you
would like to download to the playbook directory.
If you use this variable, you must list all of the paths
that you expect to download.
sources:
type: string
default: ""
description: >
Your Inventory sources. Either YAML or a path to a file.
If not provided the inventory will be take from the `sources`
runtime property.
run_data:
default: {}
description: >
Variable values.
sensitive_keys:
type: list
description: keys that you want us to obscure
default:
- ansible_password
options_config:
default: {}
description: >
Command-line options, such as `tags` or `skip_tags`.
ansible_env_vars:
default:
ANSIBLE_HOST_KEY_CHECKING: "False"
# On Ansible 2.8.x "INVALID_TASK_ATTRIBUTE_FAILED" default value has
# been changed to "True" which cause failure when run playbook
ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED: "False"
ANSIBLE_STDOUT_CALLBACK: json
description: >
A dictionary of environment variables to set.
debug_level:
type: integer
default: 2
description: >
Debug level
log_stdout:
type: boolean
description: Whether to dump output to execution event log. Set to false to speed up long executions.
default: true
additional_args:
type: string
description: >
Additional args that you want to use, for example, '-c local'.
default: ''
start_at_task:
type: string
description: >
Start the playbook at the task matching this name
default: ''
scp_extra_args:
type: string
description: >
Specify extra arguments to pass to scp only (e.g. -l)
default: ''
sftp_extra_args:
type: string
description: >
Specify extra arguments to pass to sftp only (e.g. -f, -l)
default: ''
ssh_common_args:
type: string
description: >
Specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
default: ''
ssh_extra_args:
type: string
description: >
Specify extra arguments to pass to ssh only (e.g. -R)
default: ''
timeout:
type: string
description: >
Override the connection timeout in seconds (default=10)
default: '10'
save_playbook:
type: boolean
description: >
Save playbook after action
default: false
remerge_sources:
type: boolean
description: >
update sources on target node
default: false
ansible_become:
type: boolean
description: >
A boolean value, `true` or `false` whether
to assume the user privileges.
default: false
tags:
type: list
description: >
A list of tags, in order of desired execution. If these tags are provided, they will be called, and auto_tags will be ignored.
default: []
auto_tags:
type: boolean
description: >
If set to "true", the plugin will read the playbook and generate a list of tags to execute.
This requires that the playbook is written in such a way that the specified tags will produce the desired result.
This value is ignored if tags are provided.
default: false
number_of_attempts:
type: integer
default: 3
description: >
Total number of attempts to execute the playbook if exit code represents unreachable hosts\failure.
store_facts:
type: boolean
default: true
description: >
Store ansible facts under runtime properties.
playbook_inputs: &playbook_inputs
ansible_playbook_executable_path:
default: { get_property: [SELF, ansible_playbook_executable_path] }
extra_packages:
default: { get_property: [ SELF, extra_packages ] }
galaxy_collections:
default: { get_property: [ SELF, galaxy_collections ] }
roles:
default: { get_property: [ SELF, roles ] }
playbook_source_path:
default: { get_property: [SELF, playbook_source_path] }
playbook_path:
default: { get_property: [SELF, playbook_path] }
site_yaml_path:
default: { get_property: [SELF, site_yaml_path] }
save_playbook:
default: { get_property: [SELF, save_playbook] }
remerge_sources:
default: { get_property: [SELF, remerge_sources] }
sources:
default: { get_property: [SELF, sources] }
run_data:
default: { get_property: [SELF, run_data] }
sensitive_keys:
default: { get_property: [SELF, sensitive_keys] }
options_config:
default: { get_property: [SELF, options_config] }
ansible_env_vars:
default: { get_property: [SELF, ansible_env_vars] }
debug_level:
default: { get_property: [SELF, debug_level] }
additional_args:
default: { get_property: [SELF, additional_args] }
start_at_task:
default: { get_property: [SELF, start_at_task] }
scp_extra_args:
default: { get_property: [SELF, scp_extra_args] }
sftp_extra_args:
default: { get_property: [SELF, sftp_extra_args] }
ssh_common_args:
default: { get_property: [SELF, ssh_common_args] }
ssh_extra_args:
default: { get_property: [SELF, ssh_extra_args] }
timeout:
default: { get_property: [SELF, timeout] }
tags:
default: { get_property: [ SELF, tags ] }
auto_tags:
default: { get_property: [ SELF, auto_tags ] }
number_of_attempts:
default: { get_property: [ SELF, number_of_attempts ] }
store_facts:
default: { get_property: [ SELF, store_facts ] }
node_types:
cloudify.nodes.ansible.Ansible:
derived_from: cloudify.nodes.SoftwareComponent
properties:
<<: *install_config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: ansible.cloudify_ansible.tasks.install
delete:
implementation: ansible.cloudify_ansible.tasks.uninstall
ansible:
update_venv:
implementation: ansible.cloudify_ansible.tasks.update_venv
inputs:
extra_packages:
default: []
galaxy_collections:
default: []
roles:
default: []
cloudify.nodes.ansible.Executor:
derived_from: cloudify.nodes.Root
properties:
<<: *playbook_config
interfaces:
cloudify.interfaces.lifecycle:
precreate:
implementation: ansible.cloudify_ansible.tasks.precreate
start:
implementation: ansible.cloudify_ansible.tasks.run
inputs:
<<: *playbook_inputs
delete:
implementation: ansible.cloudify_ansible.tasks.cleanup
ansible:
reload:
implementation: ansible.cloudify_ansible.tasks.run
inputs:
<<: *playbook_inputs
cloudify.nodes.ansible.Playbook:
derived_from: cloudify.nodes.Root
properties:
<<: *playbook_config
kerberos_config:
type: string
description: Either the multiline content of the KRB5_CONFIG file or the path of a file resource packaged in the blueprint.
required: false
interfaces:
cloudify.interfaces.lifecycle:
precreate:
implementation: ansible.cloudify_ansible.tasks.precreate
configure:
implementation: ansible.cloudify_ansible.tasks.configure
start:
implementation: ansible.cloudify_ansible.tasks.set_playbook_config
inputs:
<<: *playbook_inputs
poststart:
implementation: ansible.cloudify_ansible.tasks.store_facts
inputs:
<<: *playbook_inputs
ansible:
reload:
implementation: ansible.cloudify_ansible.tasks.run
inputs:
<<: *playbook_inputs
relationships:
cloudify.relationships.ansible.connected_to_host:
derived_from: cloudify.relationships.connected_to
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: ansible.cloudify_ansible.tasks.ansible_requires_host
inputs:
group_name:
default: ""
description: >
Ansible node group name
hostname:
default: ""
description: >
Hostname
host_config:
default: {}
description: >
Host configuration:
ansible_host: The hostname or IP address of the host to SSH
into.
ansible_user: The username to SSH with.
ansible_ssh_private_key_file: The private key file to SSH
with.
ansible_become: A boolean value, `true` or `false` whether
to assume the user privileges.
ansible_ssh_common_args: Additional arguments to the SSH
command, by default: '-o StrictHostKeyChecking=no'
unlink:
implementation: ansible.cloudify_ansible.tasks.ansible_remove_host
inputs:
group_name:
default: ""
description: >
Ansible node group name
hostname:
default: ""
description: >
Hostname
cloudify.relationships.ansible.run_on_host:
derived_from: cloudify.relationships.connected_to
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
establish:
implementation: ansible.cloudify_ansible.tasks.run
inputs:
ansible_playbook_executable_path:
default: { get_attribute: [SOURCE, ansible_playbook_executable_path] }
extra_packages:
default: { get_attribute: [ SOURCE, extra_packages ] }
galaxy_collections:
default: { get_attribute: [ SOURCE, galaxy_collections ] }
playbook_source_path:
default: { get_attribute: [SOURCE, playbook_source_path] }
playbook_path:
default: { get_attribute: [SOURCE, playbook_path] }
site_yaml_path:
default: { get_attribute: [SOURCE, site_yaml_path] }
save_playbook:
default: { get_attribute: [SOURCE, save_playbook] }
remerge_sources:
default: { get_attribute: [SOURCE, remerge_sources] }
sources:
default: { get_attribute: [SOURCE, sources] }
run_data:
default: { get_attribute: [SOURCE, run_data] }
sensitive_keys:
default: { get_attribute: [SOURCE, sensitive_keys] }
options_config:
default: { get_attribute: [SOURCE, options_config] }
ansible_env_vars:
default: { get_attribute: [SOURCE, ansible_env_vars] }
debug_level:
default: { get_attribute: [SOURCE, debug_level] }
additional_args:
default: { get_attribute: [SOURCE, additional_args] }
start_at_task:
default: { get_attribute: [SOURCE, start_at_task] }
scp_extra_args:
default: { get_attribute: [SOURCE, scp_extra_args] }
sftp_extra_args:
default: { get_attribute: [SOURCE, sftp_extra_args] }
ssh_common_args:
default: { get_attribute: [SOURCE, ssh_common_args] }
ssh_extra_args:
default: { get_attribute: [SOURCE, ssh_extra_args] }
timeout:
default: { get_attribute: [SOURCE, timeout] }
tags:
default: { get_attribute: [ SOURCE, tags ] }
auto_tags:
default: { get_attribute: [ SOURCE, auto_tags ] }
unlink:
implementation: ansible.cloudify_ansible.tasks.cleanup
cloudify.ansible.relationships.connected_to_host:
derived_from: cloudify.relationships.ansible.connected_to_host
cloudify.ansible.relationships.run_on_host:
derived_from: cloudify.relationships.ansible.run_on_host
workflows:
reload_ansible_playbook:
mapping: ansible.cloudify_ansible.workflows.reload_playbook
availability_rules:
node_instances_active: ['all', 'partial']
parameters:
<<: *playbook_config
node_instance_ids:
type: list
item_type: node_instance
default: []
description: |
List of node instance ID's to reload for.
node_ids:
type: list
item_type: node_id
default: []
description: |
List of node templates to reload for.
update_playbook_venv:
mapping: ansible.cloudify_ansible.workflows.update_playbook_venv
parameters:
extra_packages:
type: list
default: []
description: |
List of python packages to be installed in venv
galaxy_collections:
type: list
default: []
description: |
List of ansible galaxy collections to be installed
roles:
type: list
default: []
description: |
List of ansible roles to be installed
blueprint_labels:
obj-type:
values:
- ansible
labels:
obj-type:
values:
- ansible