install package conditionally

is it just me or conditional installation of packages is not possible with ansible?

  • name: install foreman rubygem-apipie-bindings package
    yum: name=rubygem-apipie-bindings state=present
    when: foreman_proxy_register

the package always installs even if I specify

foreman_proxy_register: false

in host_vars

It was me.
Sorry guys