Appendix B. Customizing the Manager virtual machine using automation during deployment

You can use automation to adjust or otherwise customize the Manager virtual machine during deployment by using one or more Ansible playbooks. You can run playbooks at the following points during deployment:

  • before the self-hosted engine setup
  • after the self-hosted engine setup, but before storage is configured
  • after adding the deployment host to the Manager
  • after the deployment completes entirely

Procedure

  1. Write one or more Ansible playbooks to run on the Manager virtual machine at specific points in the deployment process.
  2. Add the playbooks to the appropriate directory under /usr/share/ansible/collections/ansible_collections/redhat/rhv/roles/hosted_engine_setup/hooks/:

    enginevm_before_engine_setup
    Run the playbook before the self-hosted engine setup.
    enginevm_after_engine_setup
    Run the playbook after the self-hosted engine setup, but before storage is configured.
    after_add_host
    Run the playbook after adding the deployment host to the Manager.
    after_setup
    Run the playbook after deployment is completed.

When you run the self-hosted-engine installer, the deployment script runs the ovirt-engine-setup role, which automatically runs any playbooks in either of these directories.