On 6/29/2010 3:12 PM, David Darville wrote:
Yes, it is possible to work around the problem by not needing exported
resources to install the virtual servers. And then later export the
configuration resources.

But we want to use external nodes, and I don't see any way of specifying the
physical machine configuration with an arbitrary number of virtual machines
as an external node.

But I have been thinking about running puppetd like this:

puppetd --fqdn virtual01.domain.tld --server puppetmaster --no-daemonize \
  --tag magic-export-only

To do the actual exporting, before the virtual machine is installed, but it
seems like an ugly hack to me, and I hoped someone had a better idea.

One possibility, albeit a hack is this:

define virtual_host($physical = 'phy1', ... ) {

        case $hostname {
                $name: {
                        # configure virtual here
                }
                $physical: {
                        # configure physical here
                }
                default: { }
        }
}

virtual_host { "virt1": physical => "phy2", ... ; }

and use this define in the main scope, outside of all nodes. This will be evaluated for all your nodes, and evaluate to nothing on nodes other than the virtual or physical node.



Take care, David
--
dasz.at OG              Tel: +43 (0)664 2602670     Web: http://dasz.at
Klosterneuburg                                         UID: ATU64260999

       FB-Nr.: FN 309285 g          FB-Gericht: LG Korneuburg

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to