Skip to content

Instantly share code, notes, and snippets.

View unacceptable's full-sized avatar
👑
Strange women lying in ponds distributing swords is no basis for a system of ...

Robert J. unacceptable

👑
Strange women lying in ponds distributing swords is no basis for a system of ...
View GitHub Profile
- name: Installing Notepad++
win_package:
path: https://notepad-plus-plus.org/repository/7.x/7.5.1/npp.7.5.1.Installer.x64.exe
arguments: '/S'
product_id: "Notepad++"
state: present
when: ansible_os_family == 'Windows'
- name: Check Path Variable on Windows hosts
win_shell: $Env:Path
- name: Install 7zip on Windows Hosts
win_package:
path: http://www.7-zip.org/a/7z1701-x64.msi
product_id: '{23170F69-40C1-2702-1701-000001000000}'
arguments: '/qb'
state: present
when: ansible_os_family == 'Windows'
- name: Check Path Variable on Windows hosts
win_shell: $Env:Path
- name: Disable UAC via LUA
win_regedit:
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
name: EnableLUA
data: 0
type: dword
- name: Installing Google Chrome
win_package:
path: "https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7B1EB7E3F2-AA3B-F8C2-DA6D-E5C558CD4690%7D%26lang%3Den%26browser%3D2%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dtrue%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Ddefaultbrowser/update2/installers/ChromeSetup.exe"
arguments: '/silent /install'
product_id: "Google Chrome"
when: ansible_os_family == 'Windows'
- name: New Relic | Installing .net Agent
win_package:
path: http://download.newrelic.com/dot_net_agent/release/NewRelicDotNetAgent_x64.msi
arguments: "/qb NR_LICENSE_KEY='{{ NewRelicLicense }}' INSTALLLEVEL=50"
product_id: "{C04C5610-0BED-4BE0-94E8-DCCA8B8F5BD8}"
- name: Install Chocolatey
win_shell: |
Set-ExecutionPolicy Bypass;
Invoke-Expression (
(New-Object System.Net.WebClient).DownloadString(
'https://chocolatey.org/install.ps1'
)
)
args:
creates: 'C:\ProgramData\chocolatey'
net localgroup Group "DOMAIN\user" /add
- name: Install Windows Updates
win_updates:
category_names:
- Application
- Connectors
- CriticalUpdates
- DefinitionUpdates
- SecurityUpdates
- Tools
- UpdateRollups
- name: Check Domain users on localgroup Administrators
win_shell: |
net localgroup Administrators | findstr '{{ item | win_basename }}'
with_items:
- 'DOMAIN\user1'
- 'DOMAIN\user2'
register: user
changed_when: False
failed_when: False
#!/usr/bin/env bash
# Written by: Robert J.
# [email protected]
while read site; do
printf "\n\n$site\n";
for i in {1..3}; do
( time curl -sLIm 2 "$site" > /dev/null ) 2>&1 | \
awk '/real/ {print $2}' | \
grep '0m0\|0m1' ||