#6035 Cannot list hosts accessible to fi-apprentice FAS group
Closed: Fixed 6 years ago Opened 6 years ago by abkahrs.

According to https://fedoraproject.org/wiki/Infrastructure_Apprentice#Access_to_many_infrastructure_machines I should be able to run
ansible/scripts/hosts_with_var_set -o fas_client_groups=fi-apprentice
from within a checkout of the infra ansible repo to get a list of machines accessible to the fi-apprentice group. This did not work when I attempted it though I may be missing something. Could this be investigated?


This works just fine here.

What error(s) do you get?

[kevin@batcave01 ansible][PROD]$ scripts/hosts_with_var_set -o fas_client_groups=fi-apprentice
hosts with variable fas_client_groups matching fi-apprentice value
ask01.phx2.fedoraproject.org
ask01.stg.phx2.fedoraproject.org
ask02.phx2.fedoraproject.org
...snip...

This works just fine here.
What error(s) do you get?
[kevin@batcave01 ansible][PROD]$ scripts/hosts_with_var_set -o fas_client_groups=fi-apprentice
hosts with variable fas_client_groups matching fi-apprentice value
ask01.phx2.fedoraproject.org
ask01.stg.phx2.fedoraproject.org
ask02.phx2.fedoraproject.org
...snip...

@kevin I think my issue was that I did it locally rather than on batcave. Go ahead and close

Ah. Yeah, so on batcave01 it knows where the inventory is located, but on a local machine checkout it doesn't, so you need to add a '-i inventory' there.

ie,

scripts/hosts_with_var_set -o fas_client_groups=fi-apprentice -i inventory

which tells it to use the 'inventory' directory right there in the checkout. That gets it working here on a local checkout. So, can you perhaps update the docs to just add that -i inventory? That should also work on batcave01.

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata