|
|
|
@ -7,15 +7,15 @@
|
|
|
|
labels:
|
|
|
|
labels:
|
|
|
|
stage: "{{ stage }}"
|
|
|
|
stage: "{{ stage }}"
|
|
|
|
used_for: "{{ inventory_hostname }}"
|
|
|
|
used_for: "{{ inventory_hostname }}"
|
|
|
|
size: 10
|
|
|
|
size: "{{ postgres_backup_volume_size }}"
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
delete_protection: yes
|
|
|
|
delete_protection: yes
|
|
|
|
loop: "{{ range(1,2) | list }}"
|
|
|
|
loop: "{{ range(1, postgres_backup_volume_count+1) | list }}"
|
|
|
|
register: created_volume
|
|
|
|
register: created_volume
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
become: false
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Getting all hcloud volumes for"
|
|
|
|
- name: "Getting all hcloud volumes for {{ inventory_hostname }}"
|
|
|
|
hcloud_volume_info:
|
|
|
|
hcloud_volume_info:
|
|
|
|
api_token: "{{ hetzner_authentication_ansible }}"
|
|
|
|
api_token: "{{ hetzner_authentication_ansible }}"
|
|
|
|
label_selector: "stage={{ stage }},used_for={{ inventory_hostname }}"
|
|
|
|
label_selector: "stage={{ stage }},used_for={{ inventory_hostname }}"
|
|
|
|
@ -23,6 +23,10 @@
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
|
|
|
become: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Getting all hcloud volumes for {{ inventory_hostname }}"
|
|
|
|
|
|
|
|
debug:
|
|
|
|
|
|
|
|
msg: "{{ hcloud_volumes_found }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Setting LVM related VARs"
|
|
|
|
- name: "Setting LVM related VARs"
|
|
|
|
set_fact:
|
|
|
|
set_fact:
|
|
|
|
pvs: "{{ hcloud_volumes_found.hcloud_volume_info | json_query(jmesquery) }}"
|
|
|
|
pvs: "{{ hcloud_volumes_found.hcloud_volume_info | json_query(jmesquery) }}"
|
|
|
|
|