fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Problem with name resolution and env.roledefs


From: Nicolas Michel
Subject: [Fab-user] Problem with name resolution and env.roledefs
Date: Sun, 29 May 2011 18:56:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110503 Thunderbird/3.1.10

Hello guys,

I have a problem defining hostname binding and groups with env.roledefs. Here is an example of what I want and how I tried to do it but it definitely don't work :

in my fabfile.py

    from fabric.api import run,env

    env.roledefs = {
        'host1': ['example.no-ip.org'],
        'host2': ['172.33.29.34'],
        # below this is a group a hosts
        group1: ['host1', 'host2'],
    }

    # functions
    ...

So as you understand, I want to make binding of hosts to be able to call fabric functions easily on a single node. But I also want to group them to be able to run some other functions on multiple hosts.

The problem here is host1 and host2 in the group1 are not resolved into example.no-ip.org and 172.33.29.34.

I also tried using /etc/hosts but it won't work for host with dynamic IP binded with no-ip.org or dyndns.org.

So I'm currently blocked with fabric and I don't see how to do what I want.

Regards,
nm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]