From 2923d16783d2071bbc4bbb9f4e6b43ae72e53257 Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Sat, 28 Sep 2024 15:24:04 +1000 Subject: [PATCH 1/3] Update outputs.conf.j2 --- .../ansible/roles/splunk_byo_windows/templates/outputs.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/ansible/roles/splunk_byo_windows/templates/outputs.conf.j2 b/terraform/ansible/roles/splunk_byo_windows/templates/outputs.conf.j2 index 5b3d9c0a2..75d0d5597 100644 --- a/terraform/ansible/roles/splunk_byo_windows/templates/outputs.conf.j2 +++ b/terraform/ansible/roles/splunk_byo_windows/templates/outputs.conf.j2 @@ -2,4 +2,4 @@ defaultGroup=my_indexers [tcpout:my_indexers] -server={{ byo_splunk_ip }}:9997 \ No newline at end of file +server={{ splunk_server.byo_splunk_ip }}:9997 From cfb1a553e14830ddb24949119bbe36e6bf24aeda Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:01:40 +1000 Subject: [PATCH 2/3] Create Microsoft.PowerShell_profile.ps1 --- .../linux_install_art/files/Microsoft.PowerShell_profile.ps1 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 terraform/ansible/roles/linux_install_art/files/Microsoft.PowerShell_profile.ps1 diff --git a/terraform/ansible/roles/linux_install_art/files/Microsoft.PowerShell_profile.ps1 b/terraform/ansible/roles/linux_install_art/files/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 000000000..0c4ac268f --- /dev/null +++ b/terraform/ansible/roles/linux_install_art/files/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,2 @@ +Import-Module "/root/AtomicRedTeam/invoke-atomicredteam/Invoke-AtomicRedTeam.psd1" -Force +$PSDefaultParameterValues = @{"Invoke-AtomicTest:PathToAtomicsFolder"="/root/AtomicRedTeam/atomics"} From 14428166cc15f4f1b706ccee61e58b3b7468fc6c Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:02:41 +1000 Subject: [PATCH 3/3] Update main.yml --- .../ansible/roles/linux_install_art/tasks/main.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/terraform/ansible/roles/linux_install_art/tasks/main.yml b/terraform/ansible/roles/linux_install_art/tasks/main.yml index a6749922d..5a0a2eae7 100644 --- a/terraform/ansible/roles/linux_install_art/tasks/main.yml +++ b/terraform/ansible/roles/linux_install_art/tasks/main.yml @@ -9,5 +9,17 @@ Install-AtomicRedTeam -Force' register: output_art +- name: create directory for default powershell profile + file: + path: /root/.config/powershell + recurse: yes + state: directory + +- name: copy default powershell profile + copy: + src: Microsoft.PowerShell_profile.ps1 + dest: /root/.config/powershell/Microsoft.PowerShell_profile.ps1 + force: yes + - debug: - var: output_art.stdout_lines \ No newline at end of file + var: output_art.stdout_lines