Skip to content

Instantly share code, notes, and snippets.

View j00bar's full-sized avatar

Joshua "jag" Ginsberg j00bar

View GitHub Profile
PS C:\Program Files\DevelopmentSuite\cdk\bin> minishift start
-- Starting profile 'minishift'
-- Checking if requested hypervisor 'hyperv' is supported on this platform ... OK
-- Checking if Hyper-V driver is installed ... OK
-- Checking if Hyper-V driver is configured to use a Virtual Switch ... OK
-- Checking if user is a member of the Hyper-V Administrators group ... OK
-- Checking the ISO URL ... OK
-- Starting local OpenShift cluster using 'hyperv' hypervisor ...
-- Starting Minishift VM .................................. OK
-- Registering machine using subscription-manager
diff --git a/container/docker/engine.py b/container/docker/engine.py
index 1b6ebea..486781d 100644
--- a/container/docker/engine.py
+++ b/container/docker/engine.py
@@ -318,16 +318,24 @@ class Engine(BaseEngine, DockerSecretsMixin):
pswd_file = params.get('vault_password_file') or config.get('settings', {}).get('vault_password_file')
if pswd_file:
pswd_file_path = os.path.normpath(os.path.abspath(os.path.expanduser(pswd_file)))
- volumes[pswd_file_path] = {
- 'bind': pswd_file_path,
@j00bar
j00bar / ugly.py
Created September 26, 2017 20:56
for foo in bar:
if condition_one:
condition_two = check_the_thing()
if condition_two:
continue
else:
condition_three = do_some_stuff()
if condition_three:
do_the_thing()
else:

Keybase proof

I hereby claim:

  • I am j00bar on github.
  • I am j00bar (https://keybase.io/j00bar) on keybase.
  • I have a public key ASC8fcgOMRbnaDQ3TtKpDRwsmo0NERQDSau9GfMjdHG8nwo

To claim this, I am signing this object:

git clone https://github.com/ansible/ansible-container
git checkout builder-rewrite
python setup.py develop
ansible-container --debug build --local-builder
FROM python:2.7
# Add the dockerproject repo
RUN apt-get update -y && \
apt-get install -y apt-transport-https ca-certificates && \
echo "deb https://apt.dockerproject.org/repo debian-jessie main">/etc/apt/sources.list.d/docker.list && \
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
apt-get update -y && \
apt-get install -y python-setuptools git python-pip docker-engine && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ansible-container:
image: "sha256:66f6e379609aa7796e79bf214c5689c9a732eaad4793ef4a1a0c2cf074d3e9e2"
command: /usr/local/bin/builder.sh /usr/local/bin/ansible-playbook -i /tmp/workspace/hosts -c docker --list-hosts main.yml
environment:
- DOCKER_HOST
- DOCKER_TLS_VERIFY
- DOCKER_CERT_PATH=/docker-certs/
- COMPOSE_HTTP_TIMEOUT=3000
- DOCKER_API_VERSION=1.23
volumes:
Big-Kahuna:~ jginsberg$ docker --version
Docker version 1.12.0-rc2, build 906eacd, experimental
Big-Kahuna:~ jginsberg$ uname -a
Darwin Big-Kahuna.fios-router.home 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
Big-Kahuna:~ jginsberg$ grep builder.sh Dockerfile
ADD builder.sh /usr/local/bin/builder.sh
Big-Kahuna:~ jginsberg$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
78e89d1eaf7f 66f6e379609a "/usr/local/bin/build" 7 minutes ago Created ansible_ansible-container_1
Big-Kahuna:~ jginsberg$ docker start 78e89d1eaf7f
if cred.user:
if cred.created_by == cred.user:
convert_cred_to_user_cred(cred)
else:
conver_cred_to_org_cred(cred)
give_user_role_on_cred(cred, cred.user)
elif cred.team:
convert_cred_to_org_cred(cred)
give_team_role_on_cred(cred, cred.team)
elif is_used_by_job_template(cred):
@j00bar
j00bar / strings.py
Last active September 28, 2015 12:47
"You can use double-quotes, no problem."
'Single ticks work too.'
"You can't use unescaped double-quotes in a double-quote delimited string, but you can use single ticks."
'Jag says, "Same goes in reverse." Also, the cow says, "Moo."'
'And like you saw, if you\'re going to use a tick in a tick-delimited string, escape it.'
("If you're trying to keep your line lengths under 80 and you have a long "
"string you can wrap it in parentheses and Python will concatenate the "
"strings for you. Just don't forget trailing spaces.")
"""You can also use triple quotes or triple ticks for long strings and
simply use line breaks. Triple quoted or triple ticked strings can include