Skip to content

Instantly share code, notes, and snippets.

View andre-brongniart's full-sized avatar

andre-brongniart andre-brongniart

View GitHub Profile
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
$folders = ('C:\dfsroots\files','C:\shares\sql_backups','C:\shares\iis_backups','C:\shares\iis_fs','C:\shares\wp_fs','C:\shares\wp_backups')
mkdir -path $folders
$folders | ForEach-Object {$sharename = (Get-Item $_).name; New-SMBShare -Name $sharename -Path $_}
$folders | ForEach-Object {$access = (Get-Item $_).name}; Grant-SmbShareAccess -Name $access -AccessRight Full -AccountName KEXPRESS\andre.brongniart -Force
New-DfsnRoot -Path '\\uk02.kexpress.net\files' -TargetPath '\\i5-r-dfs-001\files' -Type DomainV2
$folders | Where-Object {$_ -like "*shares*"} | ForEach-Object {$name = (Get-Item $_).name; $DfsPath = ('\\uk02.kexpress.net\files\' + $name); $targetPath = ('\\i5-r-dfs-001\' + $name);New-DfsnFolderTarget -Path $dfsPath -TargetPath $targetPath}
New-DfsReplicationGroup -GroupName uk02_kexpress_r_dfs -DomainName uk02.kexpress.net
$folders | ForEach-Object {$foldername = (Get-Item $_).name; New-DfsReplicatedFolder -GroupName uk02_kexpress_r_dfs -FolderName $foldername -DomainName uk02.kexpress.net}
Add-D
PS C:\Windows\system32> $NewFolderA = 'rob'
$NewFolderB = 'andre'
$NewFolderC = 'gerhard'
$servers = (‘i5-r-dfs-001’,’i5-r-dfs-002’)
$dfsroot = (‘C:\dfsroots\filestore’)
$foldershare = (‘C:\dfsroots\filestore’,’C:\shares\rob’,’C:\shares\andre’,’C:\shares\gerhard’)
foreach ($server in $servers) {New-Item "\\$server\c$\shares\$NewFolderA" -ItemType Dir}
foreach ($server in $servers) {New-Item "\\$server\c$\shares\$NewFolderB" -ItemType Dir}
foreach ($server in $servers) {New-Item "\\$server\c$\shares\$NewFolderC" -ItemType Dir}
foreach ($server in $servers) {New-Item "\\$server\c$\dfsroots\filestore" -ItemType Dir}
- win_template: src=templates/win_generic/nsclient.ini-VM.j2 dest=C:\Program Files\NSClient++\nsclient.ini
notify: restart nsclient 64
when: ansible_os_family == "Windows" and {{ host_type }} == "win_generic" and ansible_architecture == "64-bit"
- name: nsclient.ini-VM 32 bit
win_copy: src=templates/win_generic/nsclient.ini-VM.j2 dest=C:\Program Files\NSClient++\nsclient.ini
notify: restart nsclient 32
when:
- ansible_os_family == "Windows"
- host_type == "win_generic"
- ansible_architecture == "32-bit"
# loops through items, but item should be a comma separate var list that get's looped through instead of using with_items
- name: manage sudoer extras file
template: src=templates/sudoer_extras/{{ item }}.j2 dest=/etc/sudoers.d/{{ item }} owner=root group=root mode=0440
with_items:
- linuxadmins
- backdevs
- buildadmin
Options Reconfigured:
performance.cache-refresh-timeout: 60
performance.write-behind-window-size: 2000000
performance.io-thread-count: 32
performance.cache-size: 1GB
performance.readdir-ahead: on
nfs.disable: off
cluster.server-quorum-ratio: 75%
#!/usr/bin/env python
import os, sys
from os import path
from datetime import datetime, timedelta
def files(path):
for file in os.listdir(path):
if os.path.isfile(os.path.join(path, file)):
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: php7-private
labels:
app: php7-private
spec:
replicas: 6
# selector:
# app: php7-private