This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install git python-setuptools python-dev sshpass libffi-dev libssl-dev make libxml2-dev libxslt1-dev acl build-essential -y | |
sudo easy_install pip | |
sudo pip install paramiko PyYAML jinja2 httplib2 requests lxml cssselect xmltodict sphinx | |
sudo pip install pywinrm | |
sudo pip install requests==2.13.0 | |
sudo pip install packaging | |
#In order to build docs: | |
sudo apt-get install asciidoc -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
concoursedb: | |
image: postgres:9.5 | |
environment: | |
POSTGRES_DB: concourse | |
POSTGRES_USER: concourse | |
POSTGRES_PASSWORD: changeme | |
PGDATA: /database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function UserSearch | |
{ | |
Param ([string]$AccountName) | |
#Check if there's a realm specified | |
if ($AccountName.Split("\").count -gt 1) | |
{ | |
if ($AccountName.Split("\")[0] -eq $env:COMPUTERNAME) | |
{ | |
$IsLocalAccount = $true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-WindowsExplorerOptions -EnableShowFileExtensions | |
choco install googlechrome | |
choco install notepadplusplus | |
choco install git.install -params '"/GitOnlyOnPath"' | |
choco install cmder | |
choco install visualstudiocode -params '"/NoDesktopIcon /NoContextMenuFiles /NoQuicklaunchIcon"' | |
choco install keepass.install | |
choco install winscp.install | |
choco install firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import rethinkdb | |
import json | |
import rethinkdb as r | |
from os import listdir | |
from os.path import isfile, join |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Set intermediate fact | |
set_fact: | |
vars_hack: "{{ hostvars[inventory_hostname] }}" | |
- name: remove temp folder | |
file: | |
path: "/tmp/ansiblecmdb" | |
state: absent | |
failed_when: false | |
delegate_to: localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: copy custom facts file | |
win_copy: | |
src: softwarefacts.ps1 | |
dest: "C:\\Scripts\\facts" | |
- name: gather extra facts | |
setup: | |
fact_path: "C:\\Scripts\\facts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$packages = Get-WmiObject -Class Win32_Product | |
$returnpackages = @() | |
foreach ($package in $packages) | |
{ | |
$PackageObj = "" | Select Name, IdentifyingNumber, Version, Caption | |
$PackageObj.Name = $Package.Name | |
$PackageObj.IdentifyingNumber = $Package.IdentifyingNumber | |
$PackageObj.Version = $Package.Version | |
$PackageObj.Caption = $Package.Caption | |
$returnpackages += $PackageObj;$PackageObj = $null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$jobj = [Newtonsoft.Json.Linq.JObject]::Parse($mystring) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Do stuff to stuff | |
hosts: localhost | |
tasks: | |
- name: set fact | |
set_fact: | |
thing: otherstuff | |
- name: first run - no loop | |
include_role: | |
name: myrole |