Skip to content

Commit 80e9389

Browse files
authored
Merge pull request #1007 from splunk/ar_local_improvements_2
Splunk SOAR local bug fix
2 parents 1c3162d + b1a2b76 commit 80e9389

File tree

3 files changed

+64
-18
lines changed

3 files changed

+64
-18
lines changed

configs/attack_range_default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ phantom_server:
173173

174174
phantom_app: "splunk_soar-unpriv-6.3.1.178-d86bf7c2-el7-x86_64.tgz"
175175
# name of the Splunk SOAR package located in apps folder.
176-
# aws: Make sure you use the RHEL 8 version which contains ....el8... in the file name
177-
# azure, local: Make sure you use the RHEL 7 version which contains ....el7... in the file name
176+
# aws, local: Make sure you use the RHEL 8 version which contains ....el8... in the file name
177+
# azure: Make sure you use the RHEL 7 version which contains ....el7... in the file name
178178

179179
phantom_byo: "0"
180180
# Enable/Disable Bring your own Phantom
Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
23
- name: Change mirror to vault.centos.org
34
shell: sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
45
become: yes
@@ -12,40 +13,85 @@
1213
become: yes
1314

1415
- name: Update all packages
16+
become: yes
1517
yum:
1618
name: "*"
1719
state: latest
1820
update_cache: yes
19-
become: yes
2021

21-
- name: Creates directory
22-
file:
23-
path: /opt/soar
24-
state: directory
22+
# - name: Enable PowerTools repository
23+
# become: yes
24+
# command: dnf config-manager --set-enabled powertools
25+
# ignore_errors: yes # Some systems might call it 'CodeReady'
26+
27+
# - name: Enable CodeReady Builder repository (alternative to PowerTools)
28+
# become: yes
29+
# command: dnf config-manager --set-enabled codeready-builder-for-rhel-8-x86_64-rpms
30+
# ignore_errors: yes
31+
32+
# - name: Install EPEL repository
33+
# become: yes
34+
# yum:
35+
# name: epel-release
36+
# state: present
37+
# disable_gpg_check: yes
38+
39+
# - name: Clean yum cache
40+
# become: yes
41+
# command: yum clean all
42+
43+
# - name: Make yum cache
44+
# become: yes
45+
# command: yum makecache
46+
47+
# - name: Install required dependencies
48+
# become: yes
49+
# yum:
50+
# name:
51+
# - fontconfig
52+
# - libicu
53+
# - libxslt
54+
# - mailcap
55+
# - xmlsec1
56+
# - xmlsec1-openssl
57+
# - zip
58+
# - jq
59+
# state: present
60+
# update_cache: yes
2561

2662
- name: Copy Splunk SOAR to server
63+
become: yes
64+
become_user: vagrant
2765
unarchive:
2866
src: "../../apps/{{ phantom_server.phantom_app }}"
2967
dest: /home/vagrant
68+
69+
- name: Creates directory
3070
become: yes
31-
become_user: vagrant
71+
become_user: root
72+
file:
73+
path: /opt/soar
74+
state: directory
75+
owner: vagrant
76+
group: vagrant
3277

3378
- name: prepare phantom install script without apps
34-
shell: /home/vagrant/splunk-soar/soar-prepare-system --splunk-soar-home /opt/soar --no-prompt
3579
become: yes
36-
environment:
37-
http_proxy: ""
38-
https_proxy: ""
80+
command: /home/vagrant/splunk-soar/soar-prepare-system --splunk-soar-home /opt/soar --no-prompt
3981

4082
- name: copy splunk soar folder
41-
shell: cp -r /home/vagrant/splunk-soar /home/phantom/splunk-soar
83+
become: yes
84+
become_user: root
85+
command: cp -r /home/vagrant/splunk-soar /home/phantom/splunk-soar
4286

4387
- name: chown splunk soar folder
44-
shell: chown -R phantom. /home/phantom/splunk-soar
88+
become: yes
89+
become_user: root
90+
command: chown -R phantom:phantom /home/phantom/splunk-soar
4591

46-
- name: run the phantom install script
92+
- name: run the phantom install script
4793
become: yes
4894
become_user: phantom
49-
shell: ./soar-install --splunk-soar-home /opt/soar --no-prompt --ignore-warnings
95+
command: ./soar-install --splunk-soar-home /opt/soar --no-prompt --ignore-warnings
5096
args:
51-
chdir: /home/phantom/splunk-soar
97+
chdir: /home/phantom/splunk-soar

vagrant/phantom_server/Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'fileutils'
33

44
config.vm.define "ar-phantom-{{ config.general.key_name }}-{{ config.general.attack_range_name }}" do |config|
55
VM_NAME_P= "ar-phantom"
6-
config.vm.box = "bento/centos-7"
6+
config.vm.box = "bento/centos-8"
77
config.vm.hostname = "#{VM_NAME_P}"
88
config.vm.boot_timeout = 600
99
config.vm.network "forwarded_port", guest: 443, host: 8443, protocol: "tcp"

0 commit comments

Comments
 (0)