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

_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to