@@ -22,6 +22,63 @@ target:
2222
2323Then write the playbook.yml file.
2424
25+ Example of using the Network module.
26+ ```
27+ ---
28+ - name: ID Cloud Host Setup
29+ hosts: idch
30+ tasks:
31+ - name: Create network VPC resource
32+ merizrizal.idcloudhost.network:
33+ api_key: "{{ your_api_key }}"
34+ name: "{{ your_desired_network_name }}"
35+ location: jkt02
36+ # Since the default value of state is set to present, we may exclude it
37+ state: present
38+
39+ - name: Delete network VPC resource
40+ merizrizal.idcloudhost.network:
41+ api_key: "{{ your_api_key }}"
42+ name: "{{ your_desired_network_name }}"
43+ location: jkt02
44+ state: absent
45+ ```
46+ To see the module documentation, run ` ansible-doc merizrizal.idcloudhost.network `
47+
48+ Example of using the VM module.
49+ ```
50+ ---
51+ - name: ID Cloud Host Setup
52+ hosts: idch
53+ tasks:
54+ - name: Create VM resource
55+ merizrizal.idcloudhost.vm:
56+ api_key: "{{ your_api_key }}"
57+ location: jkt02
58+ network_name: "{{ your_desired_network_name }}"
59+ name: "{{ your_desired_vm_name }}"
60+ os_name: ubuntu
61+ os_version: 24.04-lts
62+ disks: 20
63+ vcpu: 2
64+ ram: 2048
65+ username: admin
66+ password: My4adminpass
67+ # Since the default value of state is set to present, we may exclude it
68+ state: present
69+
70+ - name: Delete VM resource
71+ merizrizal.idcloudhost.vm:
72+ api_key: "{{ your_api_key }}"
73+ location: jkt02
74+ name: "{{ your_desired_vm_name }}"
75+ remove_public_ipv4: false
76+ state: absent
77+ ```
78+ To see the module documentation, run ` ansible-doc merizrizal.idcloudhost.vm `
79+
80+ ### _ The initial modules below will be removed later_
81+
2582Example for creating network resource.
2683```
2784---
@@ -34,7 +91,7 @@ Example for creating network resource.
3491 name: "{{ your_desired_network_name }}"
3592 location: jkt02
3693```
37- To see the module documention , run ` ansible-doc merizrizal.idcloudhost.create_network `
94+ To see the module documentation , run ` ansible-doc merizrizal.idcloudhost.create_network `
3895
3996Example for creating a new VM and get its publid IP address.
4097```
@@ -75,7 +132,7 @@ Example for creating a new VM and get its publid IP address.
75132 location: jkt02
76133 vm_uuid: "{{ create_vm_result.uuid }}
77134```
78- To see the module documention , run:
135+ To see the module documentation , run:
79136- ` ansible-doc merizrizal.idcloudhost.get_network `
80137- ` ansible-doc merizrizal.idcloudhost.create_vm `
81138- ` ansible-doc merizrizal.idcloudhost.get_public_ip `
0 commit comments