Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

support host variables #105

Open
sjwl opened this issue Dec 5, 2018 · 3 comments
Open

support host variables #105

sjwl opened this issue Dec 5, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request investigate

Comments

@sjwl
Copy link

sjwl commented Dec 5, 2018

Playbooks that take advantage of host variables like so

http_port: "{{ default_http_port | default(hostvars[groups['Atlanta'][0]]['http_port']) }}"

would need an inventory that has host variables like so

[atlanta]
host1 http_port=80 maxRequestsPerChild=808
host2 http_port=303 maxRequestsPerChild=909
@radekg radekg self-assigned this Feb 17, 2019
@radekg radekg added enhancement New feature or request investigate labels Feb 17, 2019
@radekg
Copy link
Owner

radekg commented Feb 17, 2019

Hi @sjwl, definitely something to investigate. Thank you for reporting.

@rflume-zt
Copy link

My workaround is using a seperate null_resource with the ansible provisioner for each instance I want to provision with Ansible.

That way I can pass specific vars per host through the extra_vars of the ansible provisioner.

@radekg
Copy link
Owner

radekg commented Mar 15, 2019

I will take a look at this. Ideas are welcomed, though. Maybe there is an alternative, more intuitive may for handling this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request investigate
Projects
None yet
Development

No branches or pull requests

3 participants