- role defaults
- inventory file or script group vars
- inventory group_vars/all
- playbook group_vars/all
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
# -*- encoding: utf-8 -*- | |
# requires a recent enough python with idna support in socket | |
# pyopenssl, cryptography and idna | |
from OpenSSL import SSL | |
from cryptography import x509 | |
from cryptography.x509.oid import NameOID | |
import idna | |
from socket import socket |
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
import boto3 | |
from termcolor import colored | |
ec2 = boto3.resource('ec2') | |
for i in ec2.instances.all(): | |
print("Id: {0}\tState: {1}\tLaunched: {2}\tRoot Device Name: {3}".format( | |
colored(i.id, 'cyan'), | |
colored(i.state['Name'], 'green'), |
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
- job: | |
name: Deploy_Gitlab | |
project-type: pipeline | |
parameters: | |
- string: | |
name: gitlab_host | |
default: | |
description: | |
- string: | |
name: user |
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
import ssl | |
import urllib2 | |
import urllib | |
import logging | |
import json | |
import sys | |
logger = logging.getLogger(__name__) | |
logger.addHandler(logging.NullHandler) |
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
git rebase --interactive HEAD~2 | |
# we are going to squash c into b | |
pick b76d157 b | |
pick a931ac7 c | |
# squash c into b | |
pick b76d157 b | |
s a931ac7 c |
References:
From man page: man apt_preferences
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
# Copyright 2012 United States Government as represented by the | |
# Administrator of the National Aeronautics and Space Administration. | |
# All Rights Reserved. | |
# | |
# Copyright 2012 Nebula, Inc. | |
# Copyright 2012 OpenStack Foundation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at |
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
def min(*args, **kwargs): | |
key = kwargs.get("key", None) | |
if len(args) >= 2: | |
#print('Two or more') | |
_minimum = list(args)[0] | |
for _indx in range(1,len(args)): | |
if key: | |
expression = (key(args[_indx]) < key(_minimum)) | |
else: | |
expression = args[_indx] < _minimum |
NewerOlder