Skip to content

Commit

Permalink
fix condition for provision
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Sep 21, 2023
1 parent 836d208 commit e78dc69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/mount/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
executable: /bin/bash
register: lsblk_disk
changed_when: false
when: provision | lower != 'none' and mount[0].src | length < 1
when: (provision is defined and provision | lower != 'none') and mount[0].src | length < 1

# Show the error message, if empty volume is not detected
- name: Empty volume is not detected
Expand Down Expand Up @@ -60,7 +60,7 @@
- name: "Set variable: postgresql_data_dir"
ansible.builtin.set_fact:
postgresql_data_dir: "{{ pg_data_mount_path | default('/pgdata') }}/{{ postgresql_version }}/{{ patroni_cluster_name }}"
when: provision | lower != 'none' and lsblk_uuid.stdout is defined
when: (provision is defined and provision | lower != 'none') and lsblk_uuid.stdout is defined
tags: mount

...

0 comments on commit e78dc69

Please sign in to comment.