Skip to content

dedibox support - action module - reboot / rescue mode #91

@jbguerraz

Description

@jbguerraz

Hello :)

We’d be happy to deprecate our legacy project https://github.com/skilld-labs/ansible_online_net/ (released in 2015: 10 years old feels like a great age to get deprecated 🙂).

It contains:

This is how we currently use it:

- name: Reboot the node in rescue mode
  online_net_host:
    api_token: "{{ os_online_net_api_token }}"
    id: "{{ os_host_id }}"
    boot_mode: "{{ os_rescue_image }}" # rescue-ubuntu-22.04_amd64
    state: reboot
  register: rescue
  delegate_to: 127.0.0.1
  until: rescue.output.state is not none
  retries: 20
  delay: 10

- name: Update SSH settings
  set_fact:
    ansible_ssh_user: "{{ rescue.output.state.login }}"
    ansible_ssh_pass: "{{ rescue.output.state.password }}"
    ansible_become_pass: "{{ rescue.output.state.password }}"
    ansible_ssh_port: "{{ os_rescue_ssh_port }}"
    ansible_python_interpreter: "{{ os_rescue_python }}"

...

- name: Reboot the node in normal mode
  online_net_host:
    api_token: "{{ os_online_net_api_token }}"
    id: "{{ os_host_id }}"
    boot_mode: exit-rescue
    state: reboot
  delegate_to: 127.0.0.1

- name: Update SSH settings
  set_fact:
    ansible_ssh_port: "{{ os_ssh_port }}"
    ansible_ssh_user: "{{ os_user_login }}"
    ansible_ssh_pass: "{{ os_user_plain_password }}"
    ansible_become_pass: "{{ os_user_plain_password }}"
    ansible_python_interpreter: "{{ os_python }}"

I didn’t see rescue / reboot support covered by this project, did I miss it?

If it’s not implemented yet:

  • are you open to contributions for this feature?
  • and/or, as a first step, would you be interested in adopting (or using as a base) our old 2015 action module implementation so we can upstream this and officially deprecate the legacy repo?

Thank you a lot :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions