From 4c7922cb55e424ff198bb020e5d19abf5c2cac6e Mon Sep 17 00:00:00 2001 From: Maksim Bolshakov Date: Tue, 2 Aug 2022 15:01:45 +0300 Subject: [PATCH] Add new file --- examples/hashivault_example.yaml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/hashivault_example.yaml diff --git a/examples/hashivault_example.yaml b/examples/hashivault_example.yaml new file mode 100644 index 0000000..7caba86 --- /dev/null +++ b/examples/hashivault_example.yaml @@ -0,0 +1,35 @@ +--- + +- hosts: localhost + tasks: + - hashivault_read: + url: "https://vault.domain.local" + authtype: ldap + username: "user" + password: "p@ssword" + mount_point: kv + secret: secrets/myaccount + key: app_secret + version: 2 + register: key + + - name: create a VM using app_secret from hashicorp vault + decort_kvmvm: + annotation: "VM managed by decort_kvmvm module" + authenticator: oauth2 + app_id: "" # Application id from SSO Digital Energy + app_secret: "{{ key }}" # API key from SSO Digital Energy + controller_url: "https://cloud.digitalenergy.online" + name: hashivault_read_example + cpu: 2 + ram: 2048 + boot_disk: 10 + image_name: "DECS Ubuntu 18.04 v1.2.3" #Name of OS image + networks: + - type: VINS + id: 99 #VINS id + tags: "Ansible hashivault_read example" + state: present + rg_id: 99 #Resource group id + delegate_to: localhost + register: simple_vm \ No newline at end of file