@@ -100,65 +100,3 @@ Example of using the VM module.
100100 state: absent
101101```
102102To see the module documentation, run ` ansible-doc merizrizal.idcloudhost.vm `
103-
104- ### _ The initial modules below will be removed later_
105-
106- Example for creating network resource.
107- ```
108- ---
109- - name: ID Cloud Host Setup
110- hosts: idch
111- tasks:
112- - name: Create network resource
113- merizrizal.idcloudhost.create_network:
114- api_key: "{{ your_api_key }}"
115- name: "{{ your_desired_network_name }}"
116- location: jkt02
117- ```
118- To see the module documentation, run ` ansible-doc merizrizal.idcloudhost.create_network `
119-
120- Example for creating a new VM and get its publid IP address.
121- ```
122- ---
123- - name: ID Cloud Host Setup
124- hosts: idch
125- tasks:
126- - name: Get network resource
127- merizrizal.idcloudhost.get_network:
128- api_key: "{{ your_api_key }}"
129- location: jkt02
130- register: get_network_result
131-
132- - name: Create VM
133- merizrizal.idcloudhost.create_vm:
134- api_key: "{{ your_api_key }}"
135- location: jkt02
136- network_uuid: "{{ get_network_result.uuid }}"
137- name: vm_created_by_ansible
138- os_name: ubuntu
139- os_version: 24.04-lts
140- disks: 20
141- vcpu: 2
142- ram: 2048
143- username: admin
144- password: My4adminpass
145- register: create_vm_result
146-
147- - name: Get public IPv4 address from selected private_ipv4
148- merizrizal.idcloudhost.get_public_ip:
149- api_key: "{{ your_api_key }}"
150- location: jkt02
151- private_ipv4: "{{ create_vm_result.private_ipv4 }}
152-
153- - name: Get public IPv4 address from selected vm_uuid
154- merizrizal.idcloudhost.get_public_ip:
155- api_key: "{{ your_api_key }}"
156- location: jkt02
157- vm_uuid: "{{ create_vm_result.uuid }}
158- ```
159- To see the module documentation, run:
160- - ` ansible-doc merizrizal.idcloudhost.get_network `
161- - ` ansible-doc merizrizal.idcloudhost.create_vm `
162- - ` ansible-doc merizrizal.idcloudhost.get_public_ip `
163-
164- ...TBD...
0 commit comments