Skip to content

Commit

Permalink
Fix Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alaa-bish committed Oct 31, 2023
1 parent 3b3a664 commit 2564640
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
45 changes: 32 additions & 13 deletions examples/ndb/create_clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,53 @@
validate_certs: false

tasks:
- set_fact:
clone_db:
name: <Clone Db Name>
db_params_profile:
name: <Db Profile Name>
vm:
name: <Vm Name>
password: <Vm password>
cluster:
name: <Cluster Name>
network_profile:
name: <Network Profile Name>
compute_profile:
name: <Compute Profile Name>
public_ssh_key: <Public SSH Key>
time_machine:
name: <Time Machine Name>
snapshot:
uuid: <Snapshot UUID>

- name: create clone using snapshot
ntnx_ndb_database_clones:
name: "{{clone_db1}}"
name: "{{clone_db.name}}"
desc: "ansible-created-clone"

db_params_profile:
name: "{{db_params_profile.name}}"

db_vm:
create_new_server:
name: "{{ vm1_name }}"
name: "{{ vm.name }}"
desc: "vm for db server"
password: "{{ vm_password }}"
password: "{{ vm.password }}"
cluster:
name: "{{cluster.cluster1.name}}"
name: "{{cluster.name}}"
network_profile:
name: "{{ network_profile.name }}"
compute_profile:
name: "{{ compute_profile.name }}"
pub_ssh_key: "{{ public_ssh_key }}"

postgres:
db_password: "{{vm_password}}"
db_password: "{{vm.password}}"

time_machine:
name: "{{tm1}}"
snapshot_uuid: "{{snapshot_uuid}}"
name: "{{time_machine.name}}"
snapshot_uuid: "{{snapshot.uuid}}"

removal_schedule:
days: 2
Expand All @@ -59,30 +78,30 @@

- name: create clone using point in time
ntnx_ndb_database_clones:
name: "{{clone_db1}}"
name: "{{clone_db.name}}"
desc: "ansible-created-clone"

db_params_profile:
name: "{{db_params_profile.name}}"

db_vm:
create_new_server:
name: "{{ vm1_name }}"
name: "{{ vm.name }}"
desc: "vm for db server"
password: "{{ vm_password }}"
password: "{{ vm.password }}"
cluster:
name: "{{cluster.cluster1.name}}"
name: "{{cluster.name}}"
network_profile:
name: "{{ network_profile.name }}"
compute_profile:
name: "{{ compute_profile.name }}"
pub_ssh_key: "{{ public_ssh_key }}"

postgres:
db_password: "{{vm_password}}"
db_password: "{{vm.password}}"

time_machine:
name: "{{tm1}}"
name: "{{time_machine.name}}"
pitr_timestamp: "2023-02-28 12:00:00"
timestamp: "Asia/Calcutta"

Expand Down
11 changes: 8 additions & 3 deletions examples/ndb/refresh_clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
validate_certs: false

tasks:
- set_fact:
clone_db:
uuid: <Clone Db UUID>
snapshot:
uuid: <Snapshot UUID>

- name: create spec for refresh clone to a pitr timestamp
check_mode: yes
ntnx_ndb_database_clone_refresh:
uuid: "{{clone_uuid}}"
uuid: "{{clone_db.uuid}}"
pitr_timestamp: "2023-02-04 07:29:36"
timezone: "UTC"
register: output
Expand All @@ -27,8 +32,8 @@

- name: refresh db clone
ntnx_ndb_database_clone_refresh:
uuid: "{{clone_uuid}}"
snapshot_uuid: "{{snapshot_uuid}}"
uuid: "{{clone_db.uuid}}"
snapshot_uuid: "{{snapshot.uuid}}"
register: output

- debug:
Expand Down

0 comments on commit 2564640

Please sign in to comment.