-
-
Save gowatana/7cdabeef0c2463edb5aa002ffa5b07cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Create snapshot | |
| hosts: localhost | |
| connection: local | |
| gather_facts: no | |
| collections: | |
| - nutanix.ncp | |
| module_defaults: | |
| group/nutanix.ncp.ntnx: | |
| nutanix_host: "lab-ndb-01.go-lab.jp" | |
| nutanix_username: "admin" | |
| nutanix_password: "nutanix/4u" | |
| validate_certs: false | |
| tasks: | |
| - name: Get the current date | |
| set_fact: | |
| timestamp_string: "{{ lookup('pipe', 'date \"+%Y-%m%d-%H%M%S\"') }}" | |
| - name: Create Snapshot | |
| ntnx_ndb_database_snapshots: | |
| name: "snap-{{ timestamp_string }}" | |
| time_machine_uuid: "db046ea5-d4d1-4ed5-afb7-c57c184cd3f1" | |
| expiry_days: 2 | |
| register: result | |
| - name: Get Snapshot UUID | |
| set_fact: | |
| snapshot_uuid: "{{result.snapshot_uuid}}" | |
| - name: Output Snapshot UUID | |
| debug: | |
| var: snapshot_uuid |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記の投稿むけ。
Nutanix DevStation から NDB を操作してみる。(Nutanix Meetup Hybrid 23.08)
https://blog.ntnx.jp/entry/2023/08/24/090623