Structure clean up.

This commit is contained in:
jowj 2018-07-14 18:57:23 -05:00
parent 053c44edc4
commit 2fd1e20a07
4 changed files with 13 additions and 51 deletions

View File

@ -2,12 +2,17 @@
hosts: corp
# vars_files:
# - mojo-vars-vault.yml
remote_user: josiah
remote_user: josiah_ledbetter
tasks:
- name: Copy item to remote server
copy:
src: ~/profile/.emacs.d
# make sure the permissions of the file you are copying are readable by ansible user
src: /Users/josiah_ledbetter/Documents/projects/splunk/configs/filething/
# src must not end in "/" or it will only copy files inside dir instead of entire dir
dst: /home/Josiah_Ledbetter/
dest: /opt/splunk/temp/
owner: splunk
group: splunk
group: splunk
# these below affect the entire task, and should not go under the command's indention level. This took WAY too longer to figure out.
become: "true"
become_method: sudo
become_user: root

View File

@ -2,4 +2,7 @@ all:
children:
corp:
hosts:
AUS01GMSPLUNK01:
AUS01GMSPLUNK01:
vdc:
hosts:
v1-cs-sec-splunk01:

View File

@ -1,36 +0,0 @@
# set privacy settings:
function set-RegistryValue ($path, $name) {
# a restart is required for all changes made by this function
New-Item -path $path -name $name -itemtype DWORD -Value 0 -Force
}
function disable-WindowsTracking {
# must run as administrator
# i choose to leave the language localization on, but you may not. data on how to disable is available here
# https://privacy.microsoft.com/en-us/general-privacy-settings-in-windows-10
try {
set-RegistryValue -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name AdvertisingInfo
set-RegistryValue -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name EnableSmartScreen
set-RegistryValue -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Start_TrackProgs
set-RegistryValue -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager -Name SubscribedContent-338393Enabled
}
catch {
return $false
}
return $true
}
# disable dumb default windows settings:
function disable-WindowsDefaults {
# disable bing
$doesFolderExist = Test-Path -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
if($doesFolderExist -eq $false) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\" -Name "Windows Search" -Force -ItemType Folder
}
$doesDWORDExist = Test-Path -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\ConnectedSearchUseWeb"
if($doesDWORDEXist -eq $false) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\" -Name ConnectedSearchUseWeb -Force -ItemType DWORD -Value 0
}
else {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\" -name ConnectedSearchUseWeb -value 0
}
}

View File

@ -1,10 +0,0 @@
import-module .\set-windowssettings.ps1
Describe 'Windows Setting Tests' {
Context 'Verify that registry logic works.' {
It 'can create registry keys' {
set-RegistryValue -path HKLM:\testFolder -name testDword
test-path -Path HKLM:\testFolder\testDword| Should be $true
}
}
}