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

Use of .kitchen/ansiblepush/ansiblepush_*.yml for inventory seems problematic #70

Open
gkranis opened this issue Feb 24, 2023 · 0 comments

Comments

@gkranis
Copy link

gkranis commented Feb 24, 2023

Potential concurrency issue

Lets assume that i have

  • one platform ubuntu-1804
  • multiple suites

The yml file for all these suites' inventory would be something like .kitchen/ansiblepush/ansiblepush_ubuntu1804.yml (so same file)
What happens when we run kitchen with --parallel? seems race-y.
Can we fixed with option use_instance_name: true so that hostnames are unique.

--limit does not isolate

The kitchen-ansible-inventory binary looks like it concatenates all .kitchen/ansiblepush/ansiblepush_*.yml into a single inventory. This means that after multiple suites have run the inventory would contain not only the hosts for the current suite but previous suites as well. The ruby code attempts to workaround this by using --limit. However --limit does not truly isolate the playbook for the other hosts. One example is playbooks that iterate over all hostvars: They will see the hostvars of the other hosts.Therefore suites are not really isolated from each other.
See ansible/ansible#14141 (comment) for how --limit interacts with hostvars.

Sorry if some of the above is wrong. I'm trying to migrate from kitchen-ansible to kitchen-ansiblepush so I did a quick assessment

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

1 participant