Skip to content

Instantly share code, notes, and snippets.

$ cd ~/gce_ansible
$ ./play.sh master.yml
PLAY [Create new GCE instances] ******************
...(略)...
TASK: [Create LoadBalancer] **********************
changed: [127.0.0.1] => {"changed": true, "external_ip": "107.167.187.229", ...
PLAY RECAP ***************************************
@curious-eyes
curious-eyes / file0.txt
Last active September 14, 2015 09:28
AnsibleでGCEインスタンスを管理する ref: http://qiita.com/curious-eyes/items/c7feb3edbeb7c7c640e6
$ pip install apache-libcloud
@curious-eyes
curious-eyes / urllib2_options.py
Created June 30, 2013 00:20
urllib2 sample sending OPTIONS method.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
opener = urllib2.build_opener(urllib2.HTTPHandler)
request = urllib2.Request('http://example.com', data='your_put_data')
request.add_header('Content-Type', 'your/contenttype')
request.get_method = lambda: 'OPTIONS'
url = opener.open(request)