From ce4034672fa8f2371b8bbf52ff04747583b4edda Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Thu, 10 Nov 2016 17:02:24 -0500 Subject: Add updates for containerized --- roles/etcd/etcdctl.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/etcd/etcdctl.sh (limited to 'roles/etcd') diff --git a/roles/etcd/etcdctl.sh b/roles/etcd/etcdctl.sh new file mode 100644 index 000000000..0e324a8a9 --- /dev/null +++ b/roles/etcd/etcdctl.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Sets up handy aliases for etcd, need etcdctl2 and etcdctl3 because +# command flags are different between the two. Should work on stand +# alone etcd hosts and master + etcd hosts too because we use the peer keys. +etcdctl2() { + /usr/bin/etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://`hostname`:2379 ${@} +} + +etcdctl3() { + ETCDCTL_API=3 /usr/bin/etcdctl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt --endpoints https://`hostname`:2379 ${@} +} -- cgit v1.2.3