mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 01:44:03 -07:00
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN * fix * fix * fix
This commit is contained in:
parent
8b92e0454d
commit
41cfdda6a3
533 changed files with 2130 additions and 2130 deletions
|
@ -189,7 +189,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a new instance
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 90
|
||||
register: result
|
||||
|
||||
|
@ -198,34 +198,34 @@ EXAMPLES = '''
|
|||
msg: result
|
||||
|
||||
- name: Deploy a new VM on hold
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_name: 'app1_template'
|
||||
vm_start_on_hold: 'True'
|
||||
|
||||
- name: Deploy a new VM and set its name to 'foo'
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_name: 'app1_template'
|
||||
attributes:
|
||||
name: foo
|
||||
|
||||
- name: Deploy a new VM and set its group_id and mode
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 90
|
||||
group_id: 16
|
||||
mode: 660
|
||||
|
||||
- name: Deploy a new VM as persistent
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 90
|
||||
persistent: yes
|
||||
|
||||
- name: Change VM's permissions to 640
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
instance_ids: 5
|
||||
mode: 640
|
||||
|
||||
- name: Deploy 2 new instances and set memory, vcpu, disk_size and 3 networks
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 15
|
||||
disk_size: 35.2 GB
|
||||
memory: 4 GB
|
||||
|
@ -240,7 +240,7 @@ EXAMPLES = '''
|
|||
SECURITY_GROUPS: "10"
|
||||
|
||||
- name: Deploy a new instance which uses a Template with two Disks
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 42
|
||||
disk_size:
|
||||
- 35.2 GB
|
||||
|
@ -252,14 +252,14 @@ EXAMPLES = '''
|
|||
- NETWORK_ID: 27
|
||||
|
||||
- name: "Deploy an new instance with attribute 'bar: bar1' and set its name to 'foo'"
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
attributes:
|
||||
name: foo
|
||||
bar: bar1
|
||||
|
||||
- name: "Enforce that 2 instances with attributes 'foo1: app1' and 'foo2: app2' are deployed"
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
attributes:
|
||||
foo1: app1
|
||||
|
@ -270,7 +270,7 @@ EXAMPLES = '''
|
|||
foo2: app2
|
||||
|
||||
- name: Enforce that 4 instances with an attribute 'bar' are deployed
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
attributes:
|
||||
name: app
|
||||
|
@ -282,7 +282,7 @@ EXAMPLES = '''
|
|||
# Deploy 2 new instances with attribute 'foo: bar' and labels 'app1' and 'app2' and names in format 'fooapp-##'
|
||||
# Names will be: fooapp-00 and fooapp-01
|
||||
- name: Deploy 2 new instances
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
attributes:
|
||||
name: fooapp-##
|
||||
|
@ -295,7 +295,7 @@ EXAMPLES = '''
|
|||
# Deploy 2 new instances with attribute 'app: app1' and names in format 'fooapp-###'
|
||||
# Names will be: fooapp-002 and fooapp-003
|
||||
- name: Deploy 2 new instances
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
attributes:
|
||||
name: fooapp-###
|
||||
|
@ -305,7 +305,7 @@ EXAMPLES = '''
|
|||
# Reboot all instances with name in format 'fooapp-#'
|
||||
# Instances 'fooapp-00', 'fooapp-01', 'fooapp-002' and 'fooapp-003' will be rebooted
|
||||
- name: Reboot all instances with names in a certain format
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
attributes:
|
||||
name: fooapp-#
|
||||
state: rebooted
|
||||
|
@ -313,14 +313,14 @@ EXAMPLES = '''
|
|||
# Enforce that only 1 instance with name in format 'fooapp-#' is deployed
|
||||
# The task will delete oldest instances, so only the 'fooapp-003' will remain
|
||||
- name: Enforce that only 1 instance with name in a certain format is deployed
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
exact_count: 1
|
||||
count_attributes:
|
||||
name: fooapp-#
|
||||
|
||||
- name: Deploy an new instance with a network
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
networks:
|
||||
- NETWORK_ID: 27
|
||||
|
@ -331,28 +331,28 @@ EXAMPLES = '''
|
|||
delegate_to: '{{ vm.instances[0].networks[0].ip }}'
|
||||
|
||||
- name: Terminate VMs by ids
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
instance_ids:
|
||||
- 153
|
||||
- 160
|
||||
state: absent
|
||||
|
||||
- name: Reboot all VMs that have labels 'foo' and 'app1'
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
labels:
|
||||
- foo
|
||||
- app1
|
||||
state: rebooted
|
||||
|
||||
- name: "Fetch all VMs that have name 'foo' and attribute 'app: bar'"
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
attributes:
|
||||
name: foo
|
||||
app: bar
|
||||
register: results
|
||||
|
||||
- name: Deploy 2 new instances with labels 'foo1' and 'foo2'
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_name: app_template
|
||||
labels:
|
||||
- foo1
|
||||
|
@ -360,7 +360,7 @@ EXAMPLES = '''
|
|||
count: 2
|
||||
|
||||
- name: Enforce that only 1 instance with label 'foo1' will be running
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_name: app_template
|
||||
labels:
|
||||
- foo1
|
||||
|
@ -369,21 +369,21 @@ EXAMPLES = '''
|
|||
- foo1
|
||||
|
||||
- name: Terminate all instances that have attribute foo
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
template_id: 53
|
||||
exact_count: 0
|
||||
count_attributes:
|
||||
foo:
|
||||
|
||||
- name: "Power-off the VM and save VM's disk with id=0 to the image with name 'foo-image'"
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
instance_ids: 351
|
||||
state: poweredoff
|
||||
disk_saveas:
|
||||
name: foo-image
|
||||
|
||||
- name: "Save VM's disk with id=1 to the image with name 'bar-image'"
|
||||
one_vm:
|
||||
community.general.one_vm:
|
||||
instance_ids: 351
|
||||
disk_saveas:
|
||||
name: bar-image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue