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
#!/bin/bash | |
## | |
## This example demonstrates how to auto assign a system to a tag | |
## using the System Context API. This script should be run after | |
## running the Kickstart script [https://kickstart.jumpcloud.com/Kickstart] | |
## and can be used in your chef cookbooks or puppet manifests. | |
## | |
# check if the jumpcloud agent conf has an assigned systemKey |
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
#! /usr/bin/env python | |
import boto.ec2 | |
conn = boto.ec2.connect_to_region("us-east-1") | |
reservations = conn.get_all_instances() | |
for res in reservations: | |
for inst in res.instances: | |
if 'hostname' in inst.tags: | |
print "%s (%s) [%s]" % (inst.tags['hostname'], inst.id, inst.state) |