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
# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 | |
# $Id: $ | |
DESCRIPTION="Manage gradle symlinks" | |
MAINTAINER="[email protected]" | |
SVN_DATE='20170830' | |
VERSION=${SVN_DATE} | |
find_targets() { | |
local f |
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
--- | |
- hosts: all | |
become: yes | |
vars: | |
remote_path: /etc/grafana | |
local_path: ./ | |
tasks: |
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
function is_in_array { | |
# Return 0 if element is found, 1 if not | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $FUNCNAME string array" >&2 | |
else | |
local element=${1} i="" | |
shift | |
declare -a list=$@ | |
for i in ${list[@]}; do | |
if [[ $i == $element ]]; then |
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
function ktx() { | |
# Current context | |
local current_context=$(kubectl config current-context) | |
if [[ "${1}" == "get" ]] || [[ "${1}" == "set" ]]; then | |
# Get kube contexts list | |
declare -a contexts=($(kubectl config get-contexts -o name)) | |
# Map contexts to an associative array | |
declare -A context_map |
OlderNewer