Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

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

@gkranis

Description

@gkranis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions