How to run user script while booting an instance using cloud-init software ?

Solution Verified - Updated -

Issue

  • How can we run a script while spawning an instance using cloud-init ?.
  • cloud-init software is installed on image.Need help to find a way to use/run user script on every boot.
  • How to avoid making /etc/cloud/cloud.cfg messy by keeping the scripts at different path ?.

Environment

  • Red Hat Enterpise Linux OpenStack Platform 7.
  • RHEL qcow2 image.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.