ansible-community / ara

ARA Records Ansible and makes it easier to understand and troubleshoot.
https://ara.recordsansible.org
GNU General Public License v3.0
1.87k stars 173 forks source link

Labels missing when running multiple playbooks #563

Open RicardoM17 opened 2 months ago

RicardoM17 commented 2 months ago

What is the issue ?

First of all thank you for developing ARA. It's great.

I noticed the following issue (not super important but I figured I should report it anyway).

When running the following command:

ansible-playbook -l host1 playbooks/playbook1.yml playbooks/playbook2.yml

ansible treats this as two separate runs which show up separately on ARA. All fine until here. However while the first run as the following labels: check: False, tags:all, subset:host1, default_label, the second run only gets default_label.

By default_label I mean the one I have set in ansible.cfg with default_labels =

Tested with ara 1.7.1

What should be happening ?

Ideally the labels would be the same for both playbooks

dmsimard commented 2 months ago

Hi and thanks for the issue.

That is a curious behavior indeed. I suppose if you run the two playbooks separately the labels are picked up properly ?

Some additional information that could be useful:

RicardoM17 commented 2 months ago

That is a curious behavior indeed. I suppose if you run the two playbooks separately the labels are picked up properly ?

Yes indeed. Running playbooks as normal has no issues, even if those playbooks include other playbooks etc

This is probably not the most common use case, but I use it from time to time, as we have some playbooks which are named like do-thing-1, do-thing-2 etc which I can quickly call with do-thing*.

ansible [core 2.16.9]
  config file = None
  configured module search path = ['/Users/ricardom/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/ricardom/.venv/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/ricardom/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/ricardom/.venv/bin/ansible
  python version = 3.12.4 (main, Jun  6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)] (/Users/ricardom/.venv/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True

Is this enough in terms of what you need?