{"comment":{"url":"https://api.github.com/repos/alphagov/tsuru-ansible/comments/12250408","html_url":"https://github.com/alphagov/tsuru-ansible/commit/c5f0de20444b64227c315d94461a4c19f7f0706d#commitcomment-12250408","id":12250408,"user":{"login":"keymon","id":280032,"avatar_url":"https://avatars.githubusercontent.com/u/280032?v=3","gravatar_id":"","url":"https://api.github.com/users/keymon","html_url":"https://github.com/keymon","followers_url":"https://api.github.com/users/keymon/followers","following_url":"https://api.github.com/users/keymon/following{/other_user}","gists_url":"https://api.github.com/users/keymon/gists{/gist_id}","starred_url":"https://api.github.com/users/keymon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keymon/subscriptions","organizations_url":"https://api.github.com/users/keymon/orgs","repos_url":"https://api.github.com/users/keymon/repos","events_url":"https://api.github.com/users/keymon/events{/privacy}","received_events_url":"https://api.github.com/users/keymon/received_events","type":"User","site_admin":false},"position":13,"line":13,"path":"postgres_master_post.yml","commit_id":"c5f0de20444b64227c315d94461a4c19f7f0706d","created_at":"2015-07-20T11:01:57Z","updated_at":"2015-07-20T11:01:57Z","body":"This `when` expression does not evaluate to true. The reason is that `backups.stdout` is a string.\r\n\r\nIn order to work, we must cast the type using a jinja2 filter:\r\n\r\n```diff\r\n       shell: >\r\n         su postgres -c '/usr/bin/envdir /etc/wal-e/ wal-e {% if wal_e_aws_instance_profile %}--aws-instance-profile{% endif %}\r\n         backup-push /var/lib/postgresql/9.3/main/'\r\n-      when: \"backups.stdout < 2\"\r\n+      when: \"backups.stdout|int < 2\"\r\n```"}}