Skip to content

Instantly share code, notes, and snippets.

View Justin-Schmitz's full-sized avatar

Justin Schmitz Justin-Schmitz

View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
System overview
Staff, roles & responsibilities
Environments
Applications
Software Licenses
Version control
Process Flows
Documentation
Support & Maintenance
Issue Submission & Resolution

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&staging
@ducas
ducas / Create-Administrator.ps1
Last active May 22, 2024 09:29
Create a local administrator account using PowerShell
$Username = "su"
$Password = "password"
$group = "Administrators"
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }
if ($existing -eq $null) {
@metmajer
metmajer / README.md
Created February 26, 2015 15:10
Ansible Logging To Elasticsearch

Ansible Logging To Elasticsearch

Turns Ansible log outputs into plain JSON strings and sends them to an Elasticsearch cluster.

Place the script in your playbook's plugins/callbacks/ directory.

@anvk
anvk / my_bash.sh
Last active September 2, 2019 12:34
Tiny change quick rebase in GIT
# First set your git config to push only current branch
# This will change default behaviour of your GIT push command
# instead of pushing all changed branches from your local repo to the remote
# it will push ONLY your CURRENT branch you are on to the remote
git config --global push.default simple
# Add this alias to your ~/.bash_profile (OSX, Linux) or ~/.bashrc (Windows + Git Bash)
vim ~/.bash_profile
# If you have not setup your branch to track remote one. CUR_BRANCH is the name of the branch you are working with
@MrNice
MrNice / blogpost.md
Last active February 17, 2023 09:46
Explain how to think about ansible and how to use it

Ansible

Understanding Ansible

Ansible is a powerful, simple, and easy to use tool for managing computers. It is most often used to update programs and configuration on dozens of servers at once, but the abstractions are the same whether you're managing one computer or a hundred. Ansible can even do "fun" things like change the desktop photo or backup personal files to the cloud. It can take a while to learn how to use Ansible because it has an extensive terminology, but once you understand the why and the how of Ansible, its power is readily apparent.

Ansible's power comes from its simplicity. Under the hood, Ansible is just a domain specific language (DSL) for a task runner for a secure shell (ssh). You write ansible yaml (.yml) files which describe the tasks which must run to turn plain old / virtualized / cloud computers into production ready server-beasts. These tasks, in turn, have easy to understand names like "copy", "file", "command", "ping", or "lineinfile". Each of these turns into shell comma

@nextrevision
nextrevision / deleteJenkinsJobs.groovy
Created December 3, 2015 17:30
Groovy script to delete all jenkins jobs that match a regex pattern
import jenkins.model.*
def matchedJobs = Jenkins.instance.items.findAll { job ->
job.name =~ /my_regex_here/
}
matchedJobs.each { job ->
println job.name
//job.delete()
}
@AdamOssenford
AdamOssenford / ansible-summary.md
Created January 18, 2016 00:50
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

Ansible

This document outlines how Ansible should be correctly written and utilized. It also discusses how everything you need to make Ansible work is spread across multiple repositories, and why that's a good.

Version

This document assumes the reader is using Ansible 2.0.1.0, the current latest stable version at the time of writing.

Structure

The structure is so simple, we will do nothing more than simply outline it below: