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

[Bug]: Ansible inventory source requires ansible_user fact instead of using auths #867

Open
kingfetty opened this issue Mar 16, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kingfetty
Copy link

Suzieq version

0.20.1

Install Type

hand deployed python

Python version

3.9

Impacted component

sq-poller

Steps to Reproduce

Create ansible based inventory source
Specify credentials using auths section of suzieq inventory file
Do not have ansible_user configured within the ansible inventory file
Attempt to run poller against inventory it will fail stating Username is not configured despite it being configured in the Auths section

Expected Behavior

It will use the ansible_user fact if it exists, if not it will use the Auths setting

Observed Behavior

it only works with ansible_user fact defined

Screenshots

Additional Context

@kingfetty kingfetty added the bug Something isn't working label Mar 16, 2023
@kingfetty
Copy link
Author

Suggestion:

suzieq > poller > controller > source > ansible.py

# Get user if any
ansible_user = None
if 'ansible_user' in entry:
    ansible_user = entry['ansible_user']

@ddutt ddutt self-assigned this Mar 16, 2023
@ddutt
Copy link
Member

ddutt commented Mar 16, 2023

Thanks, makes sense. Will fix for next release

@ddutt ddutt modified the milestones: 0.20.0, 0.21.0 Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants