Skip to content

Commit 4d2c41a

Browse files
committed
test(osquery): remove osquery bits to unblock AMI builds
1 parent cb223f1 commit 4d2c41a

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

ansible/files/permission_check.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@
161161

162162
# This program depends on osquery being installed on the system
163163
# Function to run osquery
164-
def run_osquery(query):
165-
process = subprocess.Popen(
166-
["osqueryi", "--json", query], stdout=subprocess.PIPE, stderr=subprocess.PIPE
167-
)
168-
output, error = process.communicate()
169-
return output.decode("utf-8")
170-
164+
#def run_osquery(query):
165+
# process = subprocess.Popen(
166+
# ["osqueryi", "--json", query], stdout=subprocess.PIPE, stderr=subprocess.PIPE
167+
# )
168+
# output, error = process.communicate()
169+
# return output.decode("utf-8")
170+
#
171171

172172
def parse_json(json_str):
173173
try:

ansible/playbook.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -210,19 +210,19 @@
210210
apt autoremove -y --purge snapd
211211
when: stage2_nix
212212

213-
- name: Install osquery from nixpkgs binary cache
214-
become: yes
215-
shell: |
216-
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:nixos/nixpkgs/f98ec4f73c762223d62bee706726138cb6ea27cc#osquery"
217-
when: stage2_nix
218-
219-
- name: Run osquery permission checks
220-
become: yes
221-
shell: |
222-
systemctl start postgresql.service
223-
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && /usr/bin/python3 /tmp/ansible-playbook/ansible/files/permission_check.py {{ '--qemu' if qemu_mode is defined else '' }}"
224-
systemctl stop postgresql.service
225-
when: stage2_nix
213+
# - name: Install osquery from nixpkgs binary cache
214+
# become: yes
215+
# shell: |
216+
# sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:nixos/nixpkgs/f98ec4f73c762223d62bee706726138cb6ea27cc#osquery"
217+
# when: stage2_nix
218+
219+
# - name: Run osquery permission checks
220+
# become: yes
221+
# shell: |
222+
# systemctl start postgresql.service
223+
# sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && /usr/bin/python3 /tmp/ansible-playbook/ansible/files/permission_check.py {{ '--qemu' if qemu_mode is defined else '' }}"
224+
# systemctl stop postgresql.service
225+
# when: stage2_nix
226226

227227
- name: Run fail2ban configuration checks
228228
become: yes
@@ -232,11 +232,11 @@
232232
systemctl stop fail2ban.service
233233
when: stage2_nix
234234

235-
- name: Remove osquery
236-
become: yes
237-
shell: |
238-
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile remove osquery"
239-
when: stage2_nix
235+
# - name: Remove osquery
236+
# become: yes
237+
# shell: |
238+
# sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile remove osquery"
239+
# when: stage2_nix
240240

241241
- name: nix collect garbage
242242
become: yes

0 commit comments

Comments
 (0)