Skip to content

Conversation

@jawadevops
Copy link

Note: The use of personal installation templates is no longer supported by OVH Cloud, as per their official announcement.

To adapt to this change, I have implemented:

A module to automate server reinstallation with partitioning

A module to track the time it takes for the server to become fully ready after reinstall

@jawadevops jawadevops changed the title My custom modules End of life for personal installation templates May 21, 2025
DOCUMENTATION = '''
---
module: dedicated_server_task_status
short_description: Check the status of an OVH server task
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already covered by the plugins/modules/dedicated_server_install_wait.py module ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No its another module to track the server status

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionnality is the same as plugins/modules/dedicated_server_install_wait.py.

description:
- Query OVH API to check the status of a dedicated server task (reinstall, etc.)
author:
- "Adapted by OpenAI from Synthesio style"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you be a bit more clear about this comment ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i created the documentation using OpenAi, i edit it now can you check?

@Skunnyk
Copy link
Collaborator

Skunnyk commented May 26, 2025

Hi,

Thank you for your contribution. We are going to review and test it :)

@m-sarti
Copy link
Contributor

m-sarti commented May 26, 2025

I suggest making the customizations parameter extensible because it allows you to pass some fundamental parameters to the API (such as the imageURL in the case of byolinux) in addition to sshKey and hostname. In our implementation we added it as a module argument, to which we add sshKey and hostname before invoking the API.

Copy link
Collaborator

@tortuegenialez tortuegenialez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
sorry for the late reply.

About the dedicated_server_reinstall.py, I would rather see this as an installation module, despite OVH saying the route is for reinstallation.

Regarding dedicated_server_task_status.py, the work is already done in plugins/modules/dedicated_server_install_wait.py.
Installation tasks are retrieved for the servicename, and a loop will wait for the process to be finished.
Here you'll have to loop with ansible for the API to return the right status.

if module.check_mode:
module.exit_json(changed=True, msg="[CHECK_MODE] Would reinstall server with provided config")

try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception are handled in the wrap_call function.

DOCUMENTATION = '''
---
module: dedicated_server_task_status
short_description: Check the status of an OVH server task
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionnality is the same as plugins/modules/dedicated_server_install_wait.py.

description:
- Reinstall an OVH dedicated server using a specific OS, hostname, SSH key, and custom storage layout.
author:
- "Inspired by Synthesio SRE team"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are the author here :)

@tortuegenialez
Copy link
Collaborator

Thank you for this PR,
as the deprecation of the old route is coming we have opened another PR (#125), feel free to jump in comments

@tortuegenialez
Copy link
Collaborator

I'm closing this PR as the PR #125 has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants