DEV 534: Added hetzner volume to prodnso-postgres-01 for /backups

feature/DEV-655
Ketelsen, Sven 3 years ago
parent 45f4fd20f3
commit e6dddbe4c9

@ -0,0 +1,4 @@
---
postgres_backup_volume_count: 4
postgres_backup_volume_size: 20

@ -1,4 +1,10 @@
---
# The count of Block Volume to create
postgres_backup_volume_count: 1
# The size of the Block Volume in GB
postgres_backup_volume_size: 10
default_postgres_version: 13
# distributions:
# bionic-pgdg

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

@ -14,9 +14,15 @@
when: server_type == "master"
# Master requirements for postgres
- name: Include Master Requirements
- name: Include Base Backup Requirements
include_tasks: base-requirements_backup.yml
when: server_type == "master"
args:
apply:
tags:
- backup-requirements
tags:
- backup-requirements
# Slave requirements for postgres
- name: Include Slave Requirements

Loading…
Cancel
Save