diff --git a/tasks/main.yml b/tasks/main.yml
index 4475284e34e3e99dc0d174b5932e0d9f3f6f49ab..c208c8890418f6a403aae9367730632696c8eb36 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -85,7 +85,7 @@
     - unicorn.rb
     - initializers/rack_attack.rb
     - resque.yml
-  when: result | changed
+  when: result is changed
 
 - name: copy database config file
   copy:
@@ -143,7 +143,7 @@
   command: bundle install -j8 --deployment --without development test mysql aws kerberos
   args:
     chdir: /home/git/gitlab
-  when: result | changed
+  when: result is changed
 
 - name: install gitlab shell
   become: yes
@@ -151,7 +151,7 @@
   command: bundle exec rake gitlab:shell:install[v2.6.3] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production
   args:
     chdir: /home/git/gitlab
-  when: result | changed
+  when: result is changed
 
 - name: initialize database
   become: yes
@@ -159,7 +159,7 @@
   command: echo yes | bundle exec rake gitlab:setup RAILS_ENV=production
   args:
     chdir: /home/git/gitlab
-  when: result | changed
+  when: result is changed
 
 - name: install the init script
   command: cp /home/git/gitlab/lib/support/init.d/gitlab /etc/init.d/gitlab
@@ -183,7 +183,7 @@
   command: bundle exec rake assets:precompile RAILS_ENV=production
   args:
     chdir: /home/git/gitlab
-  when: result | changed
+  when: result is changed
 
 - name: start gitlab instance
   become: yes