Hi,
in terms of Ansible, I would move the steps into a Playbook instead of just calling a script.
Further topics:
- CSR auto-signing fails silently if no ticket_salt is set in the ApiListener feature configuration
- https://github.com/juju4/ansible-monclient/blob/master/tasks/icinga.yml#L71
- https://www.voja.de/2017/03/25/icinga2-mit-ansible-deployen/
I’m not an Ansible user so others like @nicolaiB or @anon66228339 may post their examples as well.
Cheers,
Michael