Start systemd service after ansible playbook execution is complete
Solution 1:
It seems to me that it would be easier to start those services at the end of the Ansible playbook rather than trying to implement that in systemd. I would just add:
- name: start service
service:
name: service_name
state: started
to the end of the playbook. Ansible fails fast so that when that task is at the end of the play the completion of the rest of the tasks is ensured.