title: How can I write own cloud-config in cloud-init?
body: <p><a href="http://cloudinit.readthedocs.org/" rel="nofollow">cloud-init</a> is powerful to inject user-data in to VM instance, and its existing module provides lots of possibility.</p>
  
  <p>While to make it more easy to use, I want to define my <strong>own tag</strong> like coreos below, see detail in <a href="https://coreos.com/docs/running-coreos/platforms/openstack/" rel="nofollow">running coreos in openstack</a></p>
  
  <pre><code>#cloud-config
  
  coreos:
    etcd:
      # generate a new token for each unique cluster from https://discovery.etcd.io/new
      discovery: https://discovery.etcd.io/&lt;token&gt;
      # multi-region and multi-cloud deployments need to use $public_ipv4
      addr: $private_ipv4:4001
      peer-addr: $private_ipv4:7001
    units:
      - name: etcd.service
        command: start
      - name: fleet.service
        command: start
  </code></pre>
  
  <p>So I could have something like below using my own defined tag/config <code>myapp</code></p>
  
  <pre><code>#cloud-config
  myapp：
    admin: admin
    database: 192.168.2.3
  </code></pre>
  
  <p>I am new to cloud-init, is it called module ? it is empty in document <a href="http://cloudinit.readthedocs.org/en/latest/topics/modules.html" rel="nofollow">http://cloudinit.readthedocs.org/en/latest/topics/modules.html</a></p>
  
  <p>Can you provide some information to describe how I can write my own module ?</p>