-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
enhancementNew feature or requestNew feature or request
Description
SUMMARY
As documented in the source creating servers can be rather slow
hetzner.hcloud/plugins/modules/server.py
Lines 496 to 505 in 907a7fd
| # Action should take 60 to 90 seconds on average, but can be >10m when creating a | |
| # server from a custom images | |
| resp.action.wait_until_finished(max_retries=362) # 362 retries >= 1802 seconds | |
| for action in resp.next_actions: | |
| # Starting the server or attaching to the network might take a few minutes, | |
| # depending on the current activity in the project. | |
| # This waits up to 30minutes for each action in series, but in the background | |
| # the actions are mostly running in parallel, so after the first one the other | |
| # actions are usually completed already. | |
| action.wait_until_finished(max_retries=362) # 362 retries >= 1802 seconds |
It would be useful to allow skipping the wait here and separately wait with a new hetzner.hcloud.action module later.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
server.py
ADDITIONAL INFORMATION
Example use case
- hetzner.hcloud.server:
name: "new-server"
state: "present"
wait_for_actions: false
register: server_result
notify: Wait for server to be createdHere other stuff can be done like setting up the ip address to DNS while the action runs in the background. Finally the handler would wait for the action to finish:
- name: Wait for server to be created
hetzner.hcloud.action:
state: "success"
id: "{{ server_result[1].id }}"Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request