Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No peers when limiting hosts #180

Closed
sebix opened this issue Feb 22, 2023 · 2 comments
Closed

No peers when limiting hosts #180

sebix opened this issue Feb 22, 2023 · 2 comments

Comments

@sebix
Copy link
Contributor

sebix commented Feb 22, 2023

No peers are being added to the configuration file if ansible-playbook is used with --limit to only run the script only on a part of the network.
The reason is the usage for ansible_play_hosts:

{% for host in ansible_play_hosts %}

ansible_play_hosts gets limited when using the --limit parameter.

Is there a way to get a correct configuration file when limiting the destination hosts?

@githubixx
Copy link
Owner

I know that ansible_play_hosts is a problem. That happens when you accept a PR and don't oversee the consequences 😉 That's something that should be changed or at least another possibility added that could get around this. But currently I belief that's it not that easy. If you only change a limited set of hosts you most probably still need the facts from the other hosts. I've something in mind but I don't know when I'll have time. But pull requests are welcome of course 😉

@githubixx
Copy link
Owner

This is already covered in #79. So I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants