diff --git a/tasks/postgresql-streaming-replication.yml b/tasks/postgresql-streaming-replication.yml
index c3a6533..e56635d 100644
--- a/tasks/postgresql-streaming-replication.yml
+++ b/tasks/postgresql-streaming-replication.yml
@@ -14,7 +14,7 @@
       name: '{{ item.name }}'
       value: "{{ item.value }}"
     loop: '{{ psql_streaming_replication_config }}'
-    when: postgresql_streaming_replication_primary_node == '{{ ansible_fqdn }}'
+    when: postgresql_streaming_replication_primary_node == ansible_fqdn
     notify: Restart postgresql
 
   become: True
@@ -160,5 +160,5 @@
       - ansible_distribution_file_variety == "RedHat"
       - not standby_signal_file.stat.exists
 
-  when: postgresql_streaming_replication_primary_node != '{{ ansible_fqdn }}'
+  when: postgresql_streaming_replication_primary_node != ansible_fqdn
   tags: [ 'postgresql', 'postgres', 'pg_conf', 'postgresql_replication' ]