Post Provisioning Activity


#1

Hi,

Immediately following the provisioning of a Virtual Machine I’d like to run an Ansible Playbook to customise it. Can you please tell me how I can go about doing this? Also, during the provisioning process how do I associate an SSH key to the Virtual Machine so it works with Ansible.

Kind regards,

A


#2

HI @Automation_Account
You should change the provisioning state machine for ansible customisation. You can add step to invoke ansible job template after check_provisioning.
If you use cloud providers you can add ssh-key through cloud-init customisation template. For vmware vms only way to add key to vm templates l think.
For cloud providers I can show an example if you need.


#3

Hi,

Thanks for getting back to me. Are there any examples that show how to invoke an Ansible job template after the check provisioning stage. I’m still trying to get to grips with ManageIQ. Also, yes, if you have an example surround the use of SSH keys for use on VM’s provisioned by cloud providers I’d be interested in that as well.

Kind regards,

A


#4

Here is a comprehensive example.