This repository contains Ansible playbooks for automating interactions with BlueXP Disaster Recovery as a Service (DRaaS). The provided playbooks allow you to manage access tokens, discover virtual machines, retrieve and edit replication plans, and get detailed information about virtual machines.
Before using these playbooks, ensure you have the following:
- Ansible installed on your machine.
- Valid credentials for BlueXP DRaaS.
- Refresh token and relevant IDs for your BlueXP account.
Purpose: Obtains an access token from BlueXP using the provided refresh token. This token is used for authenticating subsequent API calls.
Purpose: Discovers new virtual machines (VMs) to be added to the replication plan and refreshes existing VMs.
Purpose: Retrieves detailed information about all current replication plans. The gathered information is used for editing replication plans.
Purpose: Allows adjustments to the current replication plan in BlueXP DRaaS.
Purpose: Retrieves detailed information about all available VMs in the source vcenter.
All required variables are defined in the vars/main.yaml
file. Ensure this file is updated with your specific details before running the playbooks.
- token: "" # Available at https://services.cloud.netapp.com/refresh-token
- clientid: "Mu0V1ywgYteI6w1MbD15fKfVIUrNXGWC" # No need to change this - Same for all api calls.
- agentid: "" # BlueXP Connector Account ID
- authorization: "Bearer " #Put you access token after
Bearer
, this will be obtained by running "access_token.yaml" playbook. - accountid: "" # BlueXP account ID
- replicationplanid: "" # Replication plan ID obtained through
get-replication
task. - vcenterid: "" # Source VCenter ID - obtained Through
get-replication
task.
Set Up Variables: Update the vars/main.yaml file with your specific values.
-
Run
access_token.yaml
to get the access token:ansible-playbook access_token.yaml
-
Run
discovery.yaml
to discover and refresh VMs:ansible-playbook discovery.yaml
-
Run
get-replicationplan.yaml
to retrieve replication plans:ansible-playbook get-replicationplan.yaml
-
Run
edit-replication.yaml
to edit the replication plan:ansible-playbook edit-replication.yaml
-
Run
get-vm.yaml
to get VM details:ansible-playbook get-vm.yaml
Ensure that all necessary credentials and IDs are correctly set in the vars/main.yaml
file before running the playbooks.