pyinfra icon indicating copy to clipboard operation
pyinfra copied to clipboard

ansible-connector: add group vars to each host

Open blinkinglight opened this issue 5 years ago • 1 comments
trafficstars

ansible hosts.yaml could have vars in each group. so add these group vars to each host. sorry, i am not familar with python but maybe this would be good start to someone.

//TODO: implement global varaibles for all hosts and override if key match

example of confing:

all:
  vars:
    hostname: default.hostname.to.all
prod:
  hosts:
    my.host.name.tld:
  vars:
    hostname: custom.for.hosts
    vhosts:
        vhost1:
             host: ip1.addr.1.1.1.1

etc.

blinkinglight avatar Aug 03 '20 14:08 blinkinglight

@blinkinglight apologies for the delay in getting back to you on this, keen to get support for this added to pyinfra. Happy to have a look myself if you can add me as a collaborator on your fork?

hi, invite sent.

blinkinglight avatar Aug 27 '20 14:08 blinkinglight

Cancelling this out, not a priority and the Ansible connector will be dropped in v3 (if desired others can implement a connector as a separate module).

Fizzadar avatar Nov 26 '23 20:11 Fizzadar