1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Native YAML - cloud/softlayer/sl_vm.py (#19056)

* Native YAML - cloud/softlayer/sl_vm.py

* Pointless to delegate/localaction, since we are already running on localhost
This commit is contained in:
Fabio Alessandro Locati 2016-12-09 14:11:31 +00:00 committed by John R Barker
parent ee27c688fd
commit ea46d5548b

View file

@ -149,8 +149,7 @@ EXAMPLES = '''
gather_facts: False
tasks:
- name: Build instance request
local_action:
module: sl_vm
sl_vm:
hostname: instance-1
domain: anydomain.com
datacenter: dal09
@ -170,8 +169,7 @@ EXAMPLES = '''
gather_facts: False
tasks:
- name: Build instances request
local_action:
module: sl_vm
sl_vm:
hostname: "{{ item.hostname }}"
domain: "{{ item.domain }}"
datacenter: "{{ item.datacenter }}"
@ -187,17 +185,49 @@ EXAMPLES = '''
ssh_keys: "{{ item.ssh_keys }}"
wait: "{{ item.wait }}"
with_items:
- { hostname: 'instance-2', domain: 'anydomain.com', datacenter: 'dal09', tags: ['ansible-module-test', 'ansible-module-test-slaves'], hourly: True, private: False, dedicated: False, local_disk: True, cpus: 1, memory: 1024, disks: [25,100], os_code: 'UBUNTU_LATEST', ssh_keys: [], wait: True }
- { hostname: 'instance-3', domain: 'anydomain.com', datacenter: 'dal09', tags: ['ansible-module-test', 'ansible-module-test-slaves'], hourly: True, private: False, dedicated: False, local_disk: True, cpus: 1, memory: 1024, disks: [25,100], os_code: 'UBUNTU_LATEST', ssh_keys: [], wait: True }
- hostname: instance-2
domain: anydomain.com
datacenter: dal09
tags:
- ansible-module-test
- ansible-module-test-slaves
hourly: True
private: False
dedicated: False
local_disk: True
cpus: 1
memory: 1024
disks:
- 25
- 100
os_code: UBUNTU_LATEST
ssh_keys: []
wait: True
- hostname: instance-3
domain: anydomain.com
datacenter: dal09
tags:
- ansible-module-test
- ansible-module-test-slaves
hourly: True
private: False
dedicated: False
local_disk: True
cpus: 1
memory: 1024
disks:
- 25
- 100
os_code: UBUNTU_LATEST
ssh_keys: []
wait: True
- name: Cancel instances
hosts: localhost
gather_facts: False
tasks:
- name: Cancel by tag
local_action:
module: sl_vm
sl_vm:
state: absent
tags: ansible-module-test
'''