Skip to content

Commit

Permalink
Fix condition for provision variable
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Sep 15, 2023
1 parent fad21ce commit 037fccd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
ansible.builtin.set_fact:
ansible_ssh_private_key_file: "~{{ lookup('env', 'USER') }}/.ssh/{{ hostvars['localhost']['tmp_ssh_key_name'] }}"
when:
- provision | lower != 'none'
- provision | default('none') | lower != 'none'
- hostvars['localhost']['ssh_key_name'] is defined
- hostvars['localhost']['ssh_key_name'] == hostvars['localhost']['tmp_ssh_key_name']
tags: always
Expand Down
2 changes: 1 addition & 1 deletion deploy_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ansible.builtin.set_fact:
ansible_ssh_private_key_file: "~{{ lookup('env', 'USER') }}/.ssh/{{ hostvars['localhost']['tmp_ssh_key_name'] }}"
when:
- provision | lower != 'none'
- provision | default('none') | lower != 'none'
- hostvars['localhost']['ssh_key_name'] is defined
- hostvars['localhost']['ssh_key_name'] == hostvars['localhost']['tmp_ssh_key_name']
tags: always
Expand Down

0 comments on commit 037fccd

Please sign in to comment.