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 argparse | |
import boto.ec2 | |
access_key = '' | |
secret_key = '' | |
def get_ec2_instances(region): | |
ec2_conn = boto.ec2.connect_to_region(region, | |
aws_access_key_id=access_key, | |
aws_secret_access_key=secret_key) |
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
# file /etc/sudoers.d/go | |
# preferably edit using visudo -f <file> | |
# allow the go user to run some commands using sudo. Need to specify full path to command. | |
Cmnd_Alias GO_SUDO_CMDS = /usr/sbin/vzctl, /bin/umount /mnt/vzdata/*/projectdata | |
# don't require a tty for running sudo | |
Defaults!GO_SUDO_CMDS !requiretty | |
# don't require password |