diff --git a/config_pgcluster.yml b/config_pgcluster.yml index 2957296f8..fc0514e02 100644 --- a/config_pgcluster.yml +++ b/config_pgcluster.yml @@ -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 diff --git a/deploy_pgcluster.yml b/deploy_pgcluster.yml index 2cdb61c79..1504ae3c3 100644 --- a/deploy_pgcluster.yml +++ b/deploy_pgcluster.yml @@ -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