From fe988133b3a4fae12672005995dd539e9edb8e78 Mon Sep 17 00:00:00 2001 From: Andrew Coleman Date: Tue, 9 Jul 2019 15:07:23 -0400 Subject: [PATCH] separate ansible + configuration scripts --- README.md | 9 - bin/kerl.completion.bash | 83 --- bin/kubectx | 227 ------- bin/kubens | 214 ------- bin/rustup.completion.bash | 1016 -------------------------------- localdev-inventory.yaml | 1 - roles/dev-tools/tasks/main.yml | 51 -- roles/docker/tasks/main.yml | 19 - roles/k8s/tasks/main.yml | 64 -- wsl-playbook.yaml | 17 - 10 files changed, 1701 deletions(-) delete mode 100644 README.md delete mode 100644 bin/kerl.completion.bash delete mode 100755 bin/kubectx delete mode 100755 bin/kubens delete mode 100644 bin/rustup.completion.bash delete mode 100644 localdev-inventory.yaml delete mode 100644 roles/dev-tools/tasks/main.yml delete mode 100644 roles/docker/tasks/main.yml delete mode 100644 roles/k8s/tasks/main.yml delete mode 100644 wsl-playbook.yaml diff --git a/README.md b/README.md deleted file mode 100644 index 6c346e6..0000000 --- a/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Installation - -## Linux Bionic/Tara distributions - - sudo apt-get install git python3 ansible ansible-lint && curl -sL https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/master/bin/install-dotfiles.sh | bash && ansible-playbook -i localdev-inventory.yaml linux-bionic-playbook.yaml - -## Just the configuration files and shell scripts - - curl -sL https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/master/bin/install-dotfiles.sh | bash diff --git a/bin/kerl.completion.bash b/bin/kerl.completion.bash deleted file mode 100644 index f9e0058..0000000 --- a/bin/kerl.completion.bash +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# bash_completion for kerl - -_kerl() -{ - local cur prev - if type _get_comp_words_by_ref &>/dev/null ; then - _get_comp_words_by_ref cur prev - else - cur=$2 prev=$3 - fi - - case $prev in - kerl) - mapfile -t COMPREPLY < <( compgen -W 'build install update list delete active path status' -- "$cur" ) - ;; - list) - mapfile -t COMPREPLY < <( compgen -W 'releases builds installations' -- "$cur" ) - ;; - build) - if [ "$COMP_CWORD" -eq 2 ]; then - if [ -f "$HOME"/.kerl/otp_releases ]; then - RELEASES=$(cat "$HOME"/.kerl/otp_releases) - fi - mapfile -t COMPREPLY < <( compgen -W "git $RELEASES" -- "$cur") - else - if [ -f "$HOME"/.kerl/otp_builds ]; then - BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds) - fi - mapfile -t COMPREPLY < <( compgen -W "$BUILDS" -- "$cur") - fi - ;; - installation) - if [ -f "$HOME"/.kerl/otp_installations ]; then - PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations) - fi - mapfile -t COMPREPLY < <( compgen -W "$PATHS" -- "$cur") - ;; - install) - if [ -f "$HOME"/.kerl/otp_builds ]; then - BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds) - fi - mapfile -t COMPREPLY < <( compgen -W "$BUILDS" -- "$cur") - ;; - path) - INSTALL_LIST="$HOME"/.kerl/otp_installations - if [ -f "$INSTALL_LIST" ]; then - NAMES=$(cut -d ' ' -f 2 "$INSTALL_LIST" | xargs basename) - fi - mapfile -t COMPREPLY < <( compgen -W "$NAMES" -- "$cur") - ;; - deploy) - if [ "$COMP_CWORD" -eq 3 ]; then - if [ -f "$HOME"/.kerl/otp_installations ]; then - PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations) - fi - fi - mapfile -t COMPREPLY < <( compgen -W "$PATHS" -- "$cur") - ;; - delete) - mapfile -t COMPREPLY < <( compgen -W 'build installation' -- "$cur") - ;; - update) - mapfile -t COMPREPLY < <( compgen -W 'releases' -- "$cur") - ;; - *) - if [ "$COMP_CWORD" -eq 3 ]; then - if [ -f "$HOME"/.kerl/otp_builds ]; then - BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds) - fi - if [ -n "$BUILDS" ]; then - for b in $BUILDS; do - if [ "$prev" = "$b" ]; then - _filedir - return 0 - fi - done - fi - fi - ;; - esac -} -complete -F _kerl kerl diff --git a/bin/kubectx b/bin/kubectx deleted file mode 100755 index 0a85429..0000000 --- a/bin/kubectx +++ /dev/null @@ -1,227 +0,0 @@ -#!/usr/bin/env bash -# -# kubectx(1) is a utility to manage and switch between kubectl contexts. - -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -[[ -n $DEBUG ]] && set -x - -set -eou pipefail -IFS=$'\n\t' - -SELF_CMD="$0" -KUBECTX="${XDG_CACHE_HOME:-$HOME/.kube}/kubectx" - -usage() { - cat <<"EOF" -USAGE: - kubectx : list the contexts - kubectx : switch to context - kubectx - : switch to the previous context - kubectx = : rename context to - kubectx =. : rename current-context to - kubectx -d [] : delete context ('.' for current-context) - (this command won't delete the user/cluster entry - that is used by the context) - - kubectx -h,--help : show this message -EOF -} - -exit_err() { - echo >&2 "${1}" - exit 1 -} - -current_context() { - $KUBECTL config view -o=jsonpath='{.current-context}' -} - -get_contexts() { - $KUBECTL config get-contexts -o=name | sort -n -} - -list_contexts() { - set -u pipefail - local cur ctx_list - cur="$(current_context)" || exit_err "error getting current context" - ctx_list=$(get_contexts) || exit_err "error getting context list" - - local yellow darkbg normal - yellow=$(tput setaf 3 || true) - darkbg=$(tput setab 0 || true) - normal=$(tput sgr0 || true) - - local cur_ctx_fg cur_ctx_bg - cur_ctx_fg=${KUBECTX_CURRENT_FGCOLOR:-$yellow} - cur_ctx_bg=${KUBECTX_CURRENT_BGCOLOR:-$darkbg} - - for c in $ctx_list; do - if [[ -n "${_KUBECTX_FORCE_COLOR:-}" || \ - -t 1 && -z "${NO_COLOR:-}" ]]; then - # colored output mode - if [[ "${c}" = "${cur}" ]]; then - echo "${cur_ctx_bg}${cur_ctx_fg}${c}${normal}" - else - echo "${c}" - fi - else - echo "${c}" - fi - done -} - -read_context() { - if [[ -f "${KUBECTX}" ]]; then - cat "${KUBECTX}" - fi -} - -save_context() { - local saved - saved="$(read_context)" - - if [[ "${saved}" != "${1}" ]]; then - printf %s "${1}" > "${KUBECTX}" - fi -} - -switch_context() { - $KUBECTL config use-context "${1}" -} - -choose_context_interactive() { - local choice - choice="$(_KUBECTX_FORCE_COLOR=1 \ - FZF_DEFAULT_COMMAND="${SELF_CMD}" \ - fzf --ansi || true)" - if [[ -z "${choice}" ]]; then - echo 2>&1 "error: you did not choose any of the options" - exit 1 - else - set_context "${choice}" - fi -} - -set_context() { - local prev - prev="$(current_context)" || exit_err "error getting current context" - - switch_context "${1}" - - if [[ "${prev}" != "${1}" ]]; then - save_context "${prev}" - fi -} - -swap_context() { - local ctx - ctx="$(read_context)" - if [[ -z "${ctx}" ]]; then - echo "error: No previous context found." >&2 - exit 1 - fi - set_context "${ctx}" -} - -context_exists() { - grep -q ^"${1}"\$ <($KUBECTL config get-contexts -o=name) -} - -rename_context() { - local old_name="${1}" - local new_name="${2}" - - if [[ "${old_name}" == "." ]]; then - old_name="$(current_context)" - fi - - if ! context_exists "${old_name}"; then - echo "error: Context \"${old_name}\" not found, can't rename it." >&2 - exit 1 - fi - - if context_exists "${new_name}"; then - echo "Context \"${new_name}\" exists, deleting..." >&2 - $KUBECTL config delete-context "${new_name}" 1>/dev/null 2>&1 - fi - - $KUBECTL config rename-context "${old_name}" "${new_name}" -} - -delete_contexts() { - for i in "${@}"; do - delete_context "${i}" - done -} - -delete_context() { - local ctx - ctx="${1}" - if [[ "${ctx}" == "." ]]; then - ctx="$(current_context)" || exit_err "error getting current context" - fi - echo "Deleting context \"${ctx}\"..." >&2 - $KUBECTL config delete-context "${ctx}" -} - -main() { - if hash kubectl 2>/dev/null; then - KUBECTL=kubectl - elif hash kubectl.exe 2>/dev/null; then - KUBECTL=kubectl.exe - else - echo >&2 "kubectl is not installed" - exit 1 - fi - - if [[ "$#" -eq 0 ]]; then - if [[ -t 1 && -z "${KUBECTX_IGNORE_FZF:-}" && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then - choose_context_interactive - else - list_contexts - fi - elif [[ "${1}" == "-d" ]]; then - if [[ "$#" -lt 2 ]]; then - echo "error: missing context NAME" >&2 - usage - exit 1 - fi - delete_contexts "${@:2}" - elif [[ "$#" -gt 1 ]]; then - echo "error: too many arguments" >&2 - usage - exit 1 - elif [[ "$#" -eq 1 ]]; then - if [[ "${1}" == "-" ]]; then - swap_context - elif [[ "${1}" == '-h' || "${1}" == '--help' ]]; then - usage - elif [[ "${1}" =~ ^-(.*) ]]; then - echo "error: unrecognized flag \"${1}\"" >&2 - usage - exit 1 - elif [[ "${1}" =~ (.+)=(.+) ]]; then - rename_context "${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}" - else - set_context "${1}" - fi - else - usage - exit 1 - fi -} - -main "$@" diff --git a/bin/kubens b/bin/kubens deleted file mode 100755 index 361e3b3..0000000 --- a/bin/kubens +++ /dev/null @@ -1,214 +0,0 @@ -#!/usr/bin/env bash -# -# kubens(1) is a utility to switch between Kubernetes namespaces. - -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -[[ -n $DEBUG ]] && set -x - -set -eou pipefail -IFS=$'\n\t' - -SELF_CMD="$0" -KUBENS_DIR="${XDG_CACHE_HOME:-$HOME/.kube}/kubens" - -usage() { - cat <<"EOF" -USAGE: - kubens : list the namespaces in the current context - kubens : change the active namespace of current context - kubens - : switch to the previous namespace in this context - kubens -h,--help : show this message -EOF -} - -exit_err() { - echo >&2 "${1}" - exit 1 -} - -current_namespace() { - local cur_ctx - - cur_ctx="$(current_context)" || exit_err "error getting current context" - ns="$($KUBECTL config view -o=jsonpath="{.contexts[?(@.name==\"${cur_ctx}\")].context.namespace}")" \ - || exit_err "error getting current namespace" - - if [[ -z "${ns}" ]]; then - echo "default" - else - echo "${ns}" - fi -} - -current_context() { - $KUBECTL config current-context -} - -get_namespaces() { - $KUBECTL get namespaces -o=jsonpath='{range .items[*].metadata.name}{@}{"\n"}{end}' -} - -escape_context_name() { - echo "${1//\//-}" -} - -namespace_file() { - local ctx="$(escape_context_name "${1}")" - echo "${KUBENS_DIR}/${ctx}" -} - -read_namespace() { - local f - f="$(namespace_file "${1}")" - [[ -f "${f}" ]] && cat "${f}" - return 0 -} - -save_namespace() { - mkdir -p "${KUBENS_DIR}" - local f saved - f="$(namespace_file "${1}")" - saved="$(read_namespace "${1}")" - - if [[ "${saved}" != "${2}" ]]; then - printf %s "${2}" > "${f}" - fi -} - -switch_namespace() { - local ctx="${1}" - $KUBECTL config set-context "${ctx}" --namespace="${2}" - echo "Active namespace is \"${2}\".">&2 -} - -choose_namespace_interactive() { - # directly calling kubens via fzf might fail with a cryptic error like - # "$FZF_DEFAULT_COMMAND failed", so try to see if we can list namespaces - # locally first - if [[ -z "$(list_namespaces)" ]]; then - echo >&2 "error: could not list namespaces (is the cluster accessible?)" - exit 1 - fi - - local choice - choice="$(_KUBECTX_FORCE_COLOR=1 \ - FZF_DEFAULT_COMMAND="${SELF_CMD}" \ - fzf --ansi || true)" - if [[ -z "${choice}" ]]; then - echo 2>&1 "error: you did not choose any of the options" - exit 1 - else - set_namespace "${choice}" - fi -} - -set_namespace() { - local ctx prev - ctx="$(current_context)" || exit_err "error getting current context" - prev="$(current_namespace)" || exit_error "error getting current namespace" - - if grep -q ^"${1}"\$ <(get_namespaces); then - switch_namespace "${ctx}" "${1}" - - if [[ "${prev}" != "${1}" ]]; then - save_namespace "${ctx}" "${prev}" - fi - else - echo "error: no namespace exists with name \"${1}\".">&2 - exit 1 - fi -} - -list_namespaces() { - local yellow darkbg normal - yellow=$(tput setaf 3 || true) - darkbg=$(tput setab 0 || true) - normal=$(tput sgr0 || true) - - local cur_ctx_fg cur_ctx_bg - cur_ctx_fg=${KUBECTX_CURRENT_FGCOLOR:-$yellow} - cur_ctx_bg=${KUBECTX_CURRENT_BGCOLOR:-$darkbg} - - local cur ns_list - cur="$(current_namespace)" || exit_err "error getting current namespace" - ns_list=$(get_namespaces) || exit_err "error getting namespace list" - - for c in $ns_list; do - if [[ -n "${_KUBECTX_FORCE_COLOR:-}" || \ - -t 1 && -z "${NO_COLOR:-}" ]]; then - # colored output mode - if [[ "${c}" = "${cur}" ]]; then - echo "${cur_ctx_bg}${cur_ctx_fg}${c}${normal}" - else - echo "${c}" - fi - else - echo "${c}" - fi - done -} - -swap_namespace() { - local ctx ns - ctx="$(current_context)" || exit_err "error getting current context" - ns="$(read_namespace "${ctx}")" - if [[ -z "${ns}" ]]; then - echo "error: No previous namespace found for current context." >&2 - exit 1 - fi - set_namespace "${ns}" -} - -main() { - if [[ -z "${KUBECTL:-}" ]]; then - if hash kubectl 2>/dev/null; then - KUBECTL=kubectl - elif hash kubectl.exe 2>/dev/null; then - KUBECTL=kubectl.exe - else - echo >&2 "kubectl is not installed" - exit 1 - fi - fi - - if [[ "$#" -eq 0 ]]; then - if [[ -t 1 && -z ${KUBECTX_IGNORE_FZF:-} && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then - choose_namespace_interactive - else - list_namespaces - fi - elif [[ "$#" -eq 1 ]]; then - if [[ "${1}" == '-h' || "${1}" == '--help' ]]; then - usage - elif [[ "${1}" == "-" ]]; then - swap_namespace - elif [[ "${1}" =~ ^-(.*) ]]; then - echo "error: unrecognized flag \"${1}\"" >&2 - usage - exit 1 - elif [[ "${1}" =~ (.+)=(.+) ]]; then - alias_context "${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}" - else - set_namespace "${1}" - fi - else - echo "error: too many flags" >&2 - usage - exit 1 - fi -} - -main "$@" diff --git a/bin/rustup.completion.bash b/bin/rustup.completion.bash deleted file mode 100644 index bdb5601..0000000 --- a/bin/rustup.completion.bash +++ /dev/null @@ -1,1016 +0,0 @@ -_rustup() { - local i cur prev opts cmds - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - cmd="" - opts="" - - for i in ${COMP_WORDS[@]} - do - case "${i}" in - rustup) - cmd="rustup" - ;; - - active-toolchain) - cmd+="__active__toolchain" - ;; - add) - cmd+="__add" - ;; - analyze) - cmd+="__analyze" - ;; - completions) - cmd+="__completions" - ;; - component) - cmd+="__component" - ;; - default) - cmd+="__default" - ;; - default-host) - cmd+="__default__host" - ;; - disable) - cmd+="__disable" - ;; - doc) - cmd+="__doc" - ;; - docs) - cmd+="__docs" - ;; - enable) - cmd+="__enable" - ;; - help) - cmd+="__help" - ;; - install) - cmd+="__install" - ;; - link) - cmd+="__link" - ;; - list) - cmd+="__list" - ;; - man) - cmd+="__man" - ;; - override) - cmd+="__override" - ;; - remove) - cmd+="__remove" - ;; - run) - cmd+="__run" - ;; - self) - cmd+="__self" - ;; - set) - cmd+="__set" - ;; - show) - cmd+="__show" - ;; - target) - cmd+="__target" - ;; - telemetry) - cmd+="__telemetry" - ;; - toolchain) - cmd+="__toolchain" - ;; - uninstall) - cmd+="__uninstall" - ;; - unset) - cmd+="__unset" - ;; - update) - cmd+="__update" - ;; - upgrade-data) - cmd+="__upgrade__data" - ;; - which) - cmd+="__which" - ;; - *) - ;; - esac - done - - case "${cmd}" in - rustup) - opts=" -v -h -V --verbose --help --version show install uninstall update default toolchain target component override run which doc man self telemetry set completions help docs" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - - rustup__completions) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component) - opts=" -h -V --help --version list add remove help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__add) - opts=" -h -V --help --version --toolchain --target ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - --target) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__list) - opts=" -h -V --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__remove) - opts=" -h -V --help --version --toolchain --target ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - --target) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__default) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__doc) - opts=" -h -V --path --book --std --reference --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__docs) - opts=" -h -V --path --book --std --reference --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__install) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__man) - opts=" -h -V --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override) - opts=" -h -V --help --version list set unset help add remove" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__add) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__list) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__remove) - opts=" -h -V --nonexistent --help --version --path " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --path) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__set) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__unset) - opts=" -h -V --nonexistent --help --version --path " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --path) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__run) - opts=" -h -V --install --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self) - opts=" -h -V --help --version update uninstall upgrade-data help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__uninstall) - opts=" -y -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__update) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__upgrade__data) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__set) - opts=" -h -V --help --version default-host help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__set__default__host) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__set__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__show) - opts=" -h -V --help --version active-toolchain help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__show__active__toolchain) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__show__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target) - opts=" -h -V --help --version list add remove help install uninstall" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__add) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__install) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__list) - opts=" -h -V --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__remove) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__uninstall) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry) - opts=" -h -V --help --version enable disable analyze help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__analyze) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__disable) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__enable) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain) - opts=" -h -V --help --version list install uninstall link help update add remove" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__add) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__install) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__link) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__list) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__remove) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__uninstall) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__update) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__uninstall) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__update) - opts=" -h -V --no-self-update --force --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__which) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac -} - -complete -F _rustup -o bashdefault -o default rustup diff --git a/localdev-inventory.yaml b/localdev-inventory.yaml deleted file mode 100644 index 800dfc8..0000000 --- a/localdev-inventory.yaml +++ /dev/null @@ -1 +0,0 @@ -default ansible_connection=local diff --git a/roles/dev-tools/tasks/main.yml b/roles/dev-tools/tasks/main.yml deleted file mode 100644 index 672954f..0000000 --- a/roles/dev-tools/tasks/main.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -- name: install apt applications - apt: - name: jq,vim,emacs,curl,htop,tmux,git,openvpn,build-essential,libssl-dev,libncurses5-dev - state: present -- name: install micro - shell: curl -sLo /tmp/micro.tar.gz https://github.com/zyedidia/micro/releases/download/v1.4.1/micro-1.4.1-linux64.tar.gz && mkdir -p /tmp/micro && tar xzf /tmp/micro.tar.gz -C /tmp/micro && install -m 755 /tmp/micro/micro-1.4.1/micro /usr/local/bin/micro-1.4.1 && rm -rf /tmp/micro* && ln -sf /usr/local/bin/micro-1.4.1 /usr/local/bin/micro - args: - warn: False - creates: /usr/local/bin/micro-1.4.1 -- name: install powerline-go - shell: curl -sLo /tmp/powerline-go https://github.com/justjanne/powerline-go/releases/download/v1.12.1/powerline-go-linux-amd64 && install -m 755 /tmp/powerline-go /usr/local/bin/powerline-go-1.12.1 && rm -f /tmp/powerline-go && ln -sf /usr/local/bin/powerline-go-1.12.1 /usr/local/bin/powerline-go - args: - warn: False - creates: /usr/local/bin/powerline-go-1.12.1 -- name: install rustup - become: no - shell: curl -o t.sh https://sh.rustup.rs -sSf && chmod 700 t.sh && ./t.sh --no-modify-path --verbose -y --default-toolchain stable && rm -f t.sh - args: - creates: ~/.cargo/bin/rustup -- name: install kerl - shell: curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl && install -m 755 kerl /usr/local/bin/kerl && rm -f kerl - args: - warn: False - creates: /usr/local/bin/kerl -- name: update kerl releases - become: no - shell: kerl update releases - args: - creates: ~/.kerl/otp_releases -- name: build erlang 22.0 - become: no - shell: kerl build 22.0 22.0 - args: - creates: ~/.kerl/builds/22.0 -- name: install erlang 22.0 - become: no - shell: kerl install 22.0 - args: - creates: ~/.kerl/installs/22.0 -- name: install kiex - become: no - shell: curl -sSL https://raw.githubusercontent.com/taylor/kiex/master/install | bash -s - args: - warn: False - creates: ~/.kiex/bin/kiex -- name: install elixir - become: no - shell: . ~/bin/kerl.setup.bash && kiex install 1.9.0 - args: - creates: ~/.kiex/elixirs/elixir-1.9.0 diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml deleted file mode 100644 index 24ea3ee..0000000 --- a/roles/docker/tasks/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: add docker-ce pubkey - shell: curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7EA0A9C3F273FCD8" | sudo apt-key add - args: - warn: False -- name: add docker-ce repo - apt_repository: - repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" - state: present - update_cache: true -- name: install docker-compose - shell: curl -sLo /tmp/docker-compose https://github.com/docker/compose/releases/download/1.24.0/docker-compose-Linux-x86_64 && install -m 755 /tmp/docker-compose /usr/local/bin/docker-compose-1.24.0 && rm -f /tmp/docker-compose && ln -sf /usr/local/bin/docker-compose-1.24.0 /usr/local/bin/docker-compose - args: - warn: False - creates: /usr/local/bin/docker-compose-1.24.0 -- name: install apt applications - apt: - name: virt-manager,virt-top,docker-ce - state: present diff --git a/roles/k8s/tasks/main.yml b/roles/k8s/tasks/main.yml deleted file mode 100644 index c2c00f0..0000000 --- a/roles/k8s/tasks/main.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- name: configure static hostfile entry for starbase4.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.100 starbase4 starbase4.consolo.lan" -- name: configure static hostfile entry for errbit.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.136 errbit.consolo.lan" -- name: configure static hostfile entry for api-doc.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.100 api-docs.consolo.lan" -- name: configure static hostfile entry for lxd.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.253 lxd.consolo.lan mattermost.lxd.consolo.lan" -- name: configure static hostfile entry for git.lxd.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.230 git.lxd.consolo.lan" -- name: install apt applications - apt: - name: python3-pip,python3-setuptools,python3-yaml,python3-wheel,socat,vpnc - state: present -- name: install pip applications - pip: - name: awscli,saws - state: present -- name: install kubectl - shell: curl -sLo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl && install -m 755 /tmp/kubectl /usr/local/bin/kubectl-1.15.0 && rm -f /tmp/kubectl && ln -sf /usr/local/bin/kubectl-1.15.0 /usr/local/bin/kubectl - args: - warn: False - creates: /usr/local/bin/kubectl-1.15.0 -- name: install kops - shell: curl -sLo /tmp/kops -L https://github.com/kubernetes/kops/releases/download/1.10.0/kops-linux-amd64 && install -m 755 /tmp/kops /usr/local/bin/kops-1.10.0 && rm -f /tmp/kops && ln -sf /usr/local/bin/kops-1.10.0 /usr/local/bin/kops - args: - warn: False - creates: /usr/local/bin/kops-1.12.2 -- name: install minikube - shell: curl -sLo /tmp/minikube https://storage.googleapis.com/minikube/releases/v1.12.2/minikube-linux-amd64 && install -m 755 /tmp/minikube /usr/local/bin/minikube-1.12.2 && rm -f /tmp/minikube && ln -sf /usr/local/bin/minikube-1.12.2 /usr/local/bin/minikube - args: - warn: False - creates: /usr/local/bin/minikube-1.12.2 -- name: install helm - shell: curl -sLo /tmp/helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz && mkdir -p /tmp/helm && tar xzf /tmp/helm.tar.gz -C /tmp/helm && install -m 755 /tmp/helm/linux-amd64/helm /usr/local/bin/helm-2.13.1 && rm -rf /tmp/helm* && ln -sf /usr/local/bin/helm-2.13.1 /usr/local/bin/helm - args: - warn: False - creates: /usr/local/bin/helm-2.13.1 -- name: install k9s - shell: curl -sLo /tmp/k9s.tar.gz https://github.com/derailed/k9s/releases/download/0.7.11/k9s_0.7.11_Linux_x86_64.tar.gz && tar xzf /tmp/k9s.tar.gz -C /tmp && install -m 755 /tmp/k9s /usr/local/bin/k9s-0.7.11 && rm -f /tmp/k9s* && ln -sf /usr/local/bin/k9s-0.7.11 /usr/local/bin/k9s - args: - warn: False - creates: /usr/local/bin/k9s-0.7.11 -- name: install popeye - shell: curl -sLo /tmp/popeye.tar.gz https://github.com/derailed/popeye/releases/download/v0.3.12/popeye_0.3.12_Linux_x86_64.tar.gz && tar xzf /tmp/popeye.tar.gz -C /tmp && install -m 755 /tmp/popeye /usr/local/bin/popeye-0.3.12 && rm -f /tmp/popeye* && ln -sf /usr/local/bin/popeye-0.3.12 /usr/local/bin/popeye - args: - warn: False - creates: /usr/local/bin/popeye-0.3.12 -- name: install stern - shell: curl -sLo /tmp/stern_linux_amd64 https://github.com/wercker/stern/releases/download/1.10.0/stern_linux_amd64 && install -m 755 /tmp/stern_linux_amd64 /usr/local/bin/stern-1.10.0 && rm -f /tmp/stern_linux_amd64 && ln -sf /usr/local/bin/stern-1.10.0 /usr/local/bin/stern - args: - warn: False - creates: /usr/local/bin/stern-1.10.0 diff --git a/wsl-playbook.yaml b/wsl-playbook.yaml deleted file mode 100644 index 05ecb83..0000000 --- a/wsl-playbook.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: wsl setup - hosts: all - become: yes - become_user: root - become_method: sudo - gather_facts: False - vars: - ansible_connection: local - ansible_python_interpreter: /usr/bin/python3 - tasks: - - include_role: - name: dev-tools - - include_role: - name: docker - - include_role: - name: k8s