copying playbooks from old repo
commit
74d567bd1a
|
@ -0,0 +1,25 @@
|
||||||
|
BSD 2-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2018, Andrew Coleman
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
## Linux Bionic/Tara distributions
|
||||||
|
|
||||||
|
sudo apt-get install git python3 ansible ansible-lint && ./install.sh
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
ansible-playbook -i localdev-inventory.yaml wsl-playbook.yaml
|
|
@ -0,0 +1 @@
|
||||||
|
default ansible_connection=local
|
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
- 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.13.0/powerline-go-linux-amd64 && install -m 755 /tmp/powerline-go /usr/local/bin/powerline-go-1.13.0 && rm -f /tmp/powerline-go && ln -sf /usr/local/bin/powerline-go-1.13.0 /usr/local/bin/powerline-go
|
||||||
|
args:
|
||||||
|
warn: False
|
||||||
|
creates: /usr/local/bin/powerline-go-1.13.0
|
||||||
|
- 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
|
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- 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
|
|
@ -0,0 +1,69 @@
|
||||||
|
---
|
||||||
|
- 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
|
||||||
|
- name: install kubectx
|
||||||
|
shell: curl -sLo /tmp/kubectx.tar.gz https://github.com/ahmetb/kubectx/archive/v0.6.3.tar.gz && cd /tmp && tar xzf kubectx.tar.gz && install -m 755 ./kubectx*/kubens /usr/local/bin/kubens-0.6.3 && install -m 755 ./kubectx*/kubectx /usr/local/bin/kubectx-0.6.3 && rm -rf /tmp/kubectx* && ln -sf /usr/local/bin/kubens-0.6.3 /usr/local/bin/kubns && ln -sf /usr/local/bin/kubectx-0.6.3
|
||||||
|
args:
|
||||||
|
warn: False
|
||||||
|
creates: /usr/local/bin/kubens-0.6.3
|
|
@ -0,0 +1 @@
|
||||||
|
default
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
- 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
|
Reference in New Issue