start new:
tmux
start new with session name:
tmux new -s myname
import jenkins.model.* | |
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /my_regex_here/ | |
} | |
matchedJobs.each { job -> | |
println job.name | |
//job.delete() | |
} |
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars
file, reference that vars
file from your task
, and encrypt the whole vars
file using ansible-vault encrypt
.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.
Mike McNeil, Aug 2014
Humans are not very good at planning. We have no problem running scenarios, thinking through possibilities, and pondering "what if?" questions. I might plan to not eat my cousin's birthday cake before she gets home, for instance. If I'm very serious, I might write down my commitment; or if I'm unsure about the pros and cons, use some organizational tool like a T-chart.
But when it comes to making a decision in the moment, all bets are off. The cake is a goner.
Below, I've included a figure containing a decision tree diagram.
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
# this program uploads to google storage using boto and eventlet all the jpg files of a selected folder | |
import eventlet | |
bcon = eventlet.import_patched("boto.gs.connection") | |
import glob | |
FOLDER = "/Users/myself/Documents/" # replace this with your chosen folder | |
BUCKET_NAME = "whateveryourbucketname" # replace this with your bucket name | |
def upload(myfile): | |
c = bcon.GSConnection() |