Skip to content

Commit e7d6b35

Browse files
committed
chore: move commands to the proper stage
1 parent 9bd0f53 commit e7d6b35

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

ansible-nix/playbook.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,3 @@
118118
debug:
119119
msg: "The postgres user is {{ 'not ' if check_user_group.rc != 0 else '' }}part of the users group"
120120

121-
- name: Install osquery from nixpkgs binary cache
122-
become: yes
123-
shell: |
124-
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#osquery"
125-
126-
- name: Install osquery permission check script
127-
become: yes
128-
copy:
129-
src: files/permission_check.py
130-
dest: /home/ubuntu/permission_check.py
131-
mode: "0755"
132-
133-
- name: Run osquery permission checks
134-
become: yes
135-
shell: |
136-
sudo -u ubuntu bash -c "python3 /home/ubuntu/permission_check.py"
137-
138-
- name: Remove osquery permission check script
139-
become: yes
140-
file:
141-
path: /home/ubuntu/permission_check.py
142-
state: absent
143-
144-
- name: Remove osquery
145-
become: yes
146-
shell: |
147-
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile osquery"

ansible-nix/tasks/stage2/playbook.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,31 @@
6262
- name: Print result to Ansible log output
6363
debug:
6464
msg: "The postgres user is {{ 'not ' if check_user_group.rc != 0 else '' }}part of the users group"
65+
66+
- name: Install osquery from nixpkgs binary cache
67+
become: yes
68+
shell: |
69+
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#osquery"
70+
71+
- name: Install osquery permission check script
72+
become: yes
73+
copy:
74+
src: files/permission_check.py
75+
dest: /home/ubuntu/permission_check.py
76+
mode: "0755"
77+
78+
- name: Run osquery permission checks
79+
become: yes
80+
shell: |
81+
sudo -u ubuntu bash -c "python3 /home/ubuntu/permission_check.py"
82+
83+
- name: Remove osquery permission check script
84+
become: yes
85+
file:
86+
path: /home/ubuntu/permission_check.py
87+
state: absent
88+
89+
- name: Remove osquery
90+
become: yes
91+
shell: |
92+
sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile osquery"

common-nix.vars.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
postgres-version = "15.6.1.46-nix-staged"
1+
postgres-version = "15.6.1.47-nix-staged"

0 commit comments

Comments
 (0)