From 8e20a550af7be39fe0e63c3cb1d5a2f6bc8870e1 Mon Sep 17 00:00:00 2001 From: Bertrand Lallau Date: Thu, 31 Aug 2017 21:47:15 +0200 Subject: [PATCH] Fix warning during Mongodb bootstrap task [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ (bootstrap_mongodb_cluster.stdout|from_json).ok != 1 }} Reason: Ansible 2.3.0 does not like delimiters in when statement. Fix small typo Change-Id: I69ea5f640b8e841e532eca97b7ed3959e9335967 Closes-Bug: #1714337 --- ansible/roles/mongodb/tasks/bootstrap_cluster.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/mongodb/tasks/bootstrap_cluster.yml b/ansible/roles/mongodb/tasks/bootstrap_cluster.yml index d1d7f66dfd..eeb0a15ff4 100644 --- a/ansible/roles/mongodb/tasks/bootstrap_cluster.yml +++ b/ansible/roles/mongodb/tasks/bootstrap_cluster.yml @@ -3,10 +3,10 @@ local_action: template src=bootstrap_cluster.js.j2 dest=/tmp/mongodb_bootstrap_replication_set.js run_once: True -- name: Bootstraping the mongodb replication set +- name: Bootstrapping the mongodb replication set command: "docker exec -t mongodb mongo {{ api_interface_address }} --quiet --eval '{{ lookup('file','/tmp/mongodb_bootstrap_replication_set.js') }}'" register: bootstrap_mongodb_cluster - failed_when: "{{ (bootstrap_mongodb_cluster.stdout|from_json).ok != 1 }}" + failed_when: (bootstrap_mongodb_cluster.stdout|from_json).ok != 1 delegate_to: "{{ groups['mongodb'][0] }}" run_once: True