Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VxRail Backup Role #22

Open
Klaas- opened this issue Mar 8, 2024 · 2 comments
Open

VxRail Backup Role #22

Klaas- opened this issue Mar 8, 2024 · 2 comments

Comments

@Klaas-
Copy link

Klaas- commented Mar 8, 2024

Hi,
is there interest in addin a backup role to this collection? I was unsatisfied with the backup procedure so I automated it with ansible.

If you guys are interested in merging I would create a PR for a whole role, if not I just leave the essentials here for the next person that wants to automate the vxrail backup :)

- name: Start VxRail Backup
  ansible.builtin.uri:
    url: https://{{ vxrail_server }}/rest/vxm/private/v1/cluster/backup
    user: "{{ vsphere_administrator_username }}"
    password: "{{ vsphere_administrator_password }}"
    method: post
    force_basic_auth: true
    body_format: json
    status_code: 201
    body:
      location_type: "{{ vxrail_backup_location_type }}"
      location: "{{ vxrail_backup_location_server }}/{{ vxrail_backup_location_path }}"
      location_user: "{{ vxrail_backup_location_user }}"
      location_password: "{{ vxrail_backup_location_password }}"
      backup_password: "{{ vxrail_backup_password }}"
      vc_username: "{{ vsphere_administrator_username }}"
      vc_password: "{{ vsphere_administrator_password }}"
  register: vxrail_backup_invocation

- name: Check VxRail Backup status and wait for it to finish
  ansible.builtin.uri:
    url: https://{{ vxrail_server }}/rest/vxm/v1/requests/{{ vxrail_backup_invocation.json.request_id }}
    user: "{{ vsphere_administrator_username }}"
    password: "{{ vsphere_administrator_password }}"
    force_basic_auth: true
  register: vxrail_backup_job_check
  # Wait for finish
  until: vxrail_backup_job_check.json.state is defined and vxrail_backup_job_check.json.state == "COMPLETED"
  retries: 20
  delay: 60
@Klaas-
Copy link
Author

Klaas- commented May 28, 2024

any interest in adding such a role @vxrail-ansible-team @CraigOLeary @rzfeeser ?

@CraigOLeary
Copy link
Collaborator

Hi @Klaas- , can you please open a pull request with your contribution where it can be reviewed by the team.

Thanks.

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

No branches or pull requests

2 participants