File tree Expand file tree Collapse file tree 4 files changed +38
-2
lines changed
Expand file tree Collapse file tree 4 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 11---
22
3+ - name : Check if Atomic Red Team is already installed
4+ become : true
5+ stat :
6+ path : /opt/AtomicRedTeam
7+ register : art_installed
8+
39- name : Install Atomic Red Team
410 become : true
511 shell : |
814 IEX (IWR https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1);
915 Install-AtomicRedTeam -Force'
1016 register : output_art
17+ when : not art_installed.stat.exists | default(false)
1118
1219- name : create directory for default powershell profile
1320 file :
Original file line number Diff line number Diff line change 2121 stat : path=/etc/init.d/osqueryd
2222 register : service_status
2323
24+ - name : Check if osquery is already installed
25+ become : true
26+ stat :
27+ path : /usr/bin/osqueryd
28+ register : osquery_installed
29+
2430- name : is osquery service exist? if yes stop it!
2531 become : true
2632 service :
3137- name : run osquery_install.sh
3238 become : true
3339 command : sh /tmp/osquery_install.sh
40+ when : not osquery_installed.stat.exists | default(false)
3441
3542- name : clean the script
3643 become : true
37- command : rm /tmp/osquery_install.sh
44+ file :
45+ path : /tmp/osquery_install.sh
46+ state : absent
3847
3948- name : copy template.osquery.conf
4049 become : true
7483
7584- name : make /var/log/osquery dir accessible to everyone (rwx)
7685 become : true
77- command : chmod a+rwx /var/log/osquery -R
86+ file :
87+ path : /var/log/osquery
88+ state : directory
89+ mode : ' 0777'
90+ recurse : yes
7891
7992- name : Create folder directory for inputs configuration
8093 become : true
Original file line number Diff line number Diff line change 55 become : true
66 ansible.builtin.shell : lsb_release -rs
77 register : result
8+ changed_when : false
89
910- name : add the microsoft repo
1011 become : true
3738 src : " SysMonLinux-CatchAll.xml"
3839 dest : " /tmp/SysMonLinux-CatchAll.xml"
3940
41+ - name : Check if sysmon is already configured
42+ become : true
43+ stat :
44+ path : /etc/sysmon/sysmon.xml
45+ register : sysmon_configured
46+
4047- name : launch with config
4148 become : true
4249 ansible.builtin.shell : sysmon -accepteula -i /tmp/SysMonLinux-CatchAll.xml
50+ when : not sysmon_configured.stat.exists | default(false)
4351
4452- name : install powershell
4553 become : true
Original file line number Diff line number Diff line change 2828 mode : ' 0644'
2929 force : yes
3030
31+ - name : Check if splunk is already configured
32+ become : true
33+ stat :
34+ path : /opt/splunkforwarder/etc/.ui_login
35+ register : splunk_configured
36+
3137- name : splunk license acceptance
3238 become : true
3339 shell : sudo -u splunkfwd /opt/splunkforwarder/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd {{ ludus_ar_linux_splunk_password }}
40+ when : not splunk_configured.stat.exists | default(false)
41+ changed_when : false
3442
3543- name : Stop splunk uf
3644 become : true
You can’t perform that action at this time.
0 commit comments