Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
# Defined type for creating virtual user accounts | |
# | |
define accounts::virtual ($uid,$realname,$pass) { | |
user { $title: | |
ensure => 'present', | |
uid => $uid, | |
gid => $title, | |
shell => '/bin/bash', | |
home => "/home/${title}", |
--- | |
driver: | |
name: azurerm | |
driver_config: | |
subscription_id: '4801fa9d-YOUR-GUID-HERE-b265ff49ce21' | |
location: 'West Europe' | |
machine_size: 'Standard_D1' | |
transport: |
delete_lines 'remove requiretty from sudoers' do | |
path '/etc/sudoers' | |
pattern '^.*requiretty' | |
end |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
import boto3 | |
import datetime | |
ec2 = boto3.resource('ec2') | |
def lambda_handler(event, context) | |
print("\n\nAWS snapshot backups starting at %s" % datetime.datetime.now()) | |
instances = ec2.instances.filter( | |
Filters=[{'Name': 'instance-state-name', 'Values': ['running']}]) | |
#If you want to filter on Instance Name |
import boto3 | |
import datetime | |
import pytz | |
ec2 = boto3.resource('ec2') | |
def lambda_handler(event, context): | |
print("\n\nAWS snapshot backups starting at %s" % datetime.datetime.now()) | |
instances = ec2.instances.filter( | |
Filters=[{'Name': 'instance-state-name', 'Values': ['running']}]) |
# Copyright (C) 2016 Martina Pugliese | |
from boto3 import resource | |
from boto3.dynamodb.conditions import Key | |
# The boto3 dynamoDB resource | |
dynamodb_resource = resource('dynamodb') | |
def get_table_metadata(table_name): |