Skip to content

Commit 03934c3

Browse files
author
P4T12ICK
committed
Fixes
1 parent 1be421d commit 03934c3

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tasks/install_art.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
---
22

3-
- name: Check if Atomic Red Team is already installed
3+
- name: Check if Atomic Red Team atomics folder is already installed
44
become: true
55
stat:
6-
path: /opt/AtomicRedTeam
7-
register: art_installed
6+
path: /root/AtomicRedTeam/atomics
7+
register: art_atomics_installed
8+
changed_when: false
9+
10+
- name: Check if Atomic Red Team module is already installed
11+
become: true
12+
shell: pwsh -Command 'if (Get-Module -ListAvailable -Name invoke-atomicredteam) { exit 0 } else { exit 1 }'
13+
register: art_module_check
14+
changed_when: false
15+
failed_when: false
816

917
- name: Install Atomic Red Team
1018
become: true
@@ -14,7 +22,8 @@
1422
IEX (IWR https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1);
1523
Install-AtomicRedTeam -Force'
1624
register: output_art
17-
when: not art_installed.stat.exists | default(false)
25+
when: (not art_atomics_installed.stat.exists | default(false)) or (art_module_check.rc != 0)
26+
changed_when: "'already installed' not in (output_art.stdout | default('') + output_art.stderr | default('')) and 'already exists' not in (output_art.stdout | default('') + output_art.stderr | default(''))"
1827

1928
- name: create directory for default powershell profile
2029
file:

tasks/install_osquery_linux.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
path: /var/log/osquery
9090
state: directory
9191
mode: '0777'
92-
recurse: yes
9392

9493
- name: Create folder directory for inputs configuration
9594
become: true

0 commit comments

Comments
 (0)