It won't work since registered variables are per host. So the check_migration_command is running on localhost and the block section should be running on production and because localhost != obs_server, the variable migration_available isn't available in the block section
Looking the code:
https://github.com/openSUSE/ansible-obs/blob/master/roles/run_migrations/tasks/main.yml#L10
It won't work since registered variables are per host. So the
check_migration_command
is running onlocalhost
and theblock
section should be running on production and becauselocalhost != obs_server
, the variablemigration_available
isn't available in the block section