From 13bb8cebcf19c3bf609bf5301c30734cbbd2cf8f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 22 Oct 2019 22:25:35 +0200 Subject: [PATCH] remove lvm integration --- defaults/main.yml | 9 --------- tasks/main.yml | 2 -- tasks/storage.yml | 36 ------------------------------------ 3 files changed, 47 deletions(-) delete mode 100644 tasks/storage.yml diff --git a/defaults/main.yml b/defaults/main.yml index 3a927cd..4e550f9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,15 +5,6 @@ postgres_repository_filename: "Postgresql-{{ postgres_version | regex_replace('\ postgres_user: postgres postgres_group: postgres -postgres_lvm_enabled: False -# This variables are only necessary if postgres_lvm_enabled is 'True' -# Set physical volumes to use in LVM -# postgres_lvm_pvs: # ['/dev/sdb', '/dev/sdc'] -# postgres_lvm_vg: # "vg_postgres" -# postgres_lvm_lv: # "lv_postgres" -# postgres_lvm_fstype: # "ext4" -# postgres_lvm_size: # "50G" - # @var postgres_base_dir: $ "_os-default_" postgres_log_destination: diff --git a/tasks/main.yml b/tasks/main.yml index d1a170d..ed9d4e5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,5 @@ --- - import_tasks: prepare.yml -- import_tasks: storage.yml - when: postgres_lvm_enabled | bool - import_tasks: install.yml - import_tasks: config.yml - import_tasks: tls.yml diff --git a/tasks/storage.yml b/tasks/storage.yml deleted file mode 100644 index 433aa33..0000000 --- a/tasks/storage.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- block: - - name: Setup base folder and set permissions - file: - path: "{{ postgres_base_dir }}" - state: directory - owner: "{{ postgres_user }}" - group: "{{ postgres_group }}" - mode: 0700 - - - name: Create volume group '{{ postgres_lvm_vg }}' - lvg: - vg: "{{ postgres_lvm_vg }}" - pvs: "{{ postgres_lvm_pvs | join(',') }}" - pesize: "4" - - - name: Create logical volume '{{ postgres_lvm_lv }}' - lvol: - vg: "{{ postgres_lvm_vg }}" - lv: "{{ postgres_lvm_lv }}" - size: "{{ postgres_lvm_size }}" - - - name: Create filesystem for '/dev/mapper/{{ postgres_lvm_vg }}-{{ postgres_lvm_lv }}' - filesystem: - fstype: "{{ postgres_lvm_fstype }}" - dev: "/dev/mapper/{{ postgres_lvm_vg }}-{{ postgres_lvm_lv }}" - resizefs: True - - - name: Mount volume to '{{ postgres_base_dir }}' - mount: - path: "{{ postgres_base_dir }}" - src: "/dev/mapper/{{ postgres_lvm_vg }}-{{ postgres_lvm_lv }}" - fstype: "{{ postgres_lvm_fstype }}" - state: mounted - become: True - become_user: root