Hi Kristian, I need to set hostnames automatically for VMs provisioned through opennebula. I believe above script can help me, but i am not sure how to use it as i am new for dev-ops tools . can you guide more how can i achieve expected results.
Hi, I donāt understand what you want to do. Thi script is for ansible dynamic inventory - it donāt provision any VMs, it just read VMs from API and group by Labels. So you can run ansible playbooks on specific VMs.
I also plan to write opennebula module for ansible, for provisioning VMs, but it is not in near future.
I am provisioning VMs through opennebula, but the provisioned VM hostname is always localhost.localdomain. I need to set hostname of newly provisioned VM automatically.
I tried to do with ansible or puppet, since both are new for meā¦ I am not able to do it.
Although, from ansible command āansible -m shell -a āhostname test1ā 192.168.1.228ā it can be done, but that is manual taskā¦ I need to automate either during provisioning of VM through webUI of opennebula by additing script or after that using ansible/puppet.
I had tried below link also, but this will do everything as expected ( update /etc/hosts file, puppet client and master config, cert auto register), but hostname is not getting change in this method also.
Thanksā¦ I am trying to learn Ansible/Puppet, to automate product deployments and management. Do we have any Orchestration tool with gui or WebUI ? ( i dont have scripting skills)
Hi all, this script is just dynamic hosts inventory, so you can instead of defining fixed hosts inventory in hosts file, use this script and load running VMs by labels a run ansible on them. If you need use ansible to deploy new VMs, them you need look into Ansible Modules Index -> Cloud -> Opennebula
I understood the script purpose but I wonder how to use it.
Do I have to install something in my vonecloud vm or should I use another server ? Iām not familiard with code so I need a little explanation to start use it.
Hello, everything is in ansible documentation. You just call my script in ansible command by -i flag. You should also read quick start guide of ansible.