you are using the same registered var in several tasks, the last one
will overwrite the previous ones, you might want to create a diff var
per task and then have a aggregated one.
I’m not sure I understand what you are asking for…by design, a playbook (and therefore a role) will stop processing if any task fails. So, it is implicit that the next task won’t happen unless the previous one succeeds.
Also, it looks like you are trying to change the hostname…is that correct? There is a hostname module that performs many of these steps.
Is there a reason you wouldn’t use notify to trigger the network service restart, and call it as a handler?