Just for example:

Setup script (from params/cmdb/...):
    # Replace vApp properties
    vapp = set_vapp_property(vapp, 'hostname', data[item]['hostname'])
    vapp = set_vapp_property(vapp, 'eth0_IP', data[item]['ipv4'])
    vapp = set_vapp_property(vapp, 'eth0_mask', data[item]['ipv4_netmask'])
    vapp = set_vapp_property(vapp, 'eth0_gw', data[item]['ipv4_gateway'])

Server init script (run once at start, after boot ansible/puppet/... can 
take control):

        GET_VAPP=`vmtoolsd --cmd "info-get guestinfo.ovfEnv"`

        VAPP_HOSTNAME=`echo "$GET_VAPP" | grep '<Property 
oe:key="hostname"' | cut -d '"' -f 4`
        VAPP_DOMAIN=`echo "$GET_VAPP" | grep '<Property oe:key="domain"' | 
cut -d '"' -f 4`
        VAPP_ETH0_IP=`echo "$GET_VAPP" | grep '<Property oe:key="eth0_IP"' 
| cut -d '"' -f 4`
        VAPP_ETH0_MASK=`echo "$GET_VAPP" | grep '<Property 
oe:key="eth0_mask"' | cut -d '"' -f 4`
        VAPP_ETH0_GW=`echo "$GET_VAPP" | grep '<Property oe:key="eth0_gw"' 
| cut -d '"' -f 4`


Dne pondělí 16. února 2015 8:51:22 UTC+1 Vaclav Adamec napsal(a):
>
> Hi,
>  did anybody try vsphere vApp setup? (there is a support for it in 
> pysphere) It will be quite nice to have possibility to deploy from 
> cloning/creating to setup IP and start up fully functional VM (some 
> internal init script which will grab set vApp and change networking)
>
> Vasek
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/38a4f2e8-c875-4bb9-b992-1ffb688f5f59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to