-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
feature request: setup module import osquery data #14066
Comments
I think it would be beneficial to add an osqueryi module, so it would be easy to run ad hoc queries on a group of hosts. Though, I disagree with doing a loop over all osquery tables in the setup module by default. Nevertheless I would like to showcase a simple trick of integrating osquery selects into Ansible setup facts. By using the This is a simple example
|
Another workaround is using the - hosts: all
tasks:
- shell: osqueryi "SELECT * FROM etc_hosts" --json
register: output
- set_fact:
osquery_etc_hosts: "{{ output.stdout }}"
- debug: msg={{ osquery_etc_hosts }}
- debug: msg={{ output }} I also looked into how to create modules, and I think it would be easy to write a |
@3rdman Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this issue with this template: |
@3rdman You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information. |
It would be really nice to have the setup module import osquery data if osqueryi is present on the system.
The simple path is to:
for table in $(osqueryi .tables)
schema=
osqueryi '.schema $table'
for row in
select * from $table
add row to setup_options["osquery_"]
done
The text was updated successfully, but these errors were encountered: