|
|
@ -16,6 +16,7 @@
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
from ansible import utils
|
|
|
|
from ansible import utils
|
|
|
|
|
|
|
|
import os
|
|
|
|
import urllib2
|
|
|
|
import urllib2
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
import json
|
|
|
|
import json
|
|
|
@ -24,6 +25,8 @@ except ImportError:
|
|
|
|
|
|
|
|
|
|
|
|
# this can be made configurable, not should not use ansible.cfg
|
|
|
|
# this can be made configurable, not should not use ansible.cfg
|
|
|
|
ANSIBLE_ETCD_URL = 'http://127.0.0.1:4001'
|
|
|
|
ANSIBLE_ETCD_URL = 'http://127.0.0.1:4001'
|
|
|
|
|
|
|
|
if os.getenv('ANSIBLE_ETCD_URL') is not None:
|
|
|
|
|
|
|
|
ANSIBLE_ETCD_URL = os.environ['ANSIBLE_ETCD_URL']
|
|
|
|
|
|
|
|
|
|
|
|
class etcd():
|
|
|
|
class etcd():
|
|
|
|
def __init__(self, url=ANSIBLE_ETCD_URL):
|
|
|
|
def __init__(self, url=ANSIBLE_ETCD_URL):
|
|
|
|