add divided roles so that wsl (and others) installations can have X-less installs

pull/1/head
Andrew Coleman 2019-05-30 09:53:43 -04:00
parent 174143b078
commit 87bf89dedd
6 changed files with 165 additions and 131 deletions

View File

@ -3,3 +3,7 @@
## 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

View File

@ -1,5 +1,5 @@
---
- name: localdev setup
- name: linux desktop setup
hosts: all
become: yes
become_user: root
@ -9,133 +9,11 @@
ansible_connection: local
ansible_python_interpreter: /usr/bin/python3
tasks:
- 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: 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: add nextcloud pubkey
shell: curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x60EE47FBAD3DD469" | sudo apt-key add
args:
warn: False
- name: add nextcloud repo
apt_repository:
repo: "deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu bionic main"
state: present
update_cache: true
- name: install apt applications
apt:
name: jq,python3-pip,python3-setuptools,python3-yaml,python3-wheel,apt-transport-https,socat,vim,emacs,curl,htop,tmux,libvirt-clients,libvirt-daemon-system,qemu-kvm,vpnc,virt-manager,virt-top,virt-goodies,git,vagrant,vagrant-libvirt,vagrant-mutate,xsltproc,fop,openvpn,docker-ce,docker-compose,nextcloud-client,build-essential,libssl-dev,libncurses5-dev
state: present
- name: install pip applications
pip:
name: awscli,saws
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 kubectl
shell: curl -sLo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.11.3/bin/linux/amd64/kubectl && install -m 755 /tmp/kubectl /usr/local/bin/kubectl-1.11.3 && rm -f /tmp/kubectl && ln -sf /usr/local/bin/kubectl-1.11.3 /usr/local/bin/kubectl
args:
warn: False
creates: /usr/local/bin/kubectl-1.11.3
- 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.10.0
- name: install minikube
shell: curl -sLo /tmp/minikube https://storage.googleapis.com/minikube/releases/v0.35.0/minikube-linux-amd64 && install -m 755 /tmp/minikube /usr/local/bin/minikube-0.35.0 && rm -f /tmp/minikube && ln -sf /usr/local/bin/minikube-0.35.0 /usr/local/bin/minikube
args:
warn: False
creates: /usr/local/bin/minikube-0.35.0
- name: install helm
shell: curl -sLo /tmp/helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.13.0-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.0 && rm -rf /tmp/helm* && ln -sf /usr/local/bin/helm-2.13.0 /usr/local/bin/helm
args:
creates: /usr/local/bin/helm-2.13.0
- name: install tilt
shell: curl -sL https://github.com/windmilleng/tilt/releases/download/v0.7.5/tilt.0.7.5.linux.x86_64.tar.gz | tar -xzv tilt && mv tilt /usr/local/bin/tilt-0.7.5 & ln -sf /usr/local/bin/tilt-0.7.5 /usr/local/bin/tilt
args:
warn: False
creates: /usr/local/bin/tilt-0.7.5
- name: install docker-machine
shell: curl -sLo docker-machine https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-linux-x86_64 && install -m 755 docker-machine /usr/local/bin/docker-machine-0.16.0 && rm -f docker-machine && ln -sf /usr/local/bin/docker-machine-0.16.0 /usr/local/bin/docker-machine
args:
warn: False
creates: /usr/local/bin/docker-machine-0.16.0
- name: install docker-machine-driver-kvm2
shell: curl -sLo docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && install -m 755 docker-machine-driver-kvm2 /usr/local/bin/docker-machine-driver-kvm2 && rm -f docker-machine-driver-kvm2
args:
creates: /usr/local/bin/docker-machine-driver-kvm2
- 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:
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 21.0
become: no
shell: kerl build 21.0 21.0
args:
creates: ~/.kerl/builds/21.0
- name: install erlang 21.0
become: no
shell: kerl install 21.0
args:
creates: ~/.kerl/installs/21.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.7.4
args:
creates: ~/.kiex/elixirs/elixir-1.7.4
- name: install kitty terminal emulator
become: no
shell: curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin launch=n && ln -s ~/.local/kitty.app/bin/kitty ~/bin/ && mkdir -p ~/.local/share/applications && cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications && sed -i "s/Icon\=kitty/Icon\=\/home\/$USER\/.local\/kitty.app\/share\/icons\/hicolor\/256x256\/apps\/kitty.png/g" ~/.local/share/applications/kitty.desktop
args:
warn: False
creates: ~/bin/kitty
- include_role:
name: dev-tools
- include_role:
name: docker
- include_role:
name: k8s
- include_role:
name: linux-desktop

View File

@ -0,0 +1,50 @@
---
- 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:
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 21.0
become: no
shell: kerl build 21.0 21.0
args:
creates: ~/.kerl/builds/21.0
- name: install erlang 21.0
become: no
shell: kerl install 21.0
args:
creates: ~/.kerl/installs/21.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.7.4
args:
creates: ~/.kiex/elixirs/elixir-1.7.4

View File

@ -0,0 +1,24 @@
---
- 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 apt applications
apt:
name: libvirt-clients,libvirt-daemon-system,qemu-kvm,virt-manager,virt-top,virt-goodies,vagrant,vagrant-libvirt,vagrant-mutate,xsltproc,fop,docker-ce,docker-compose
state: present
- name: install docker-machine
shell: curl -sLo docker-machine https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-linux-x86_64 && install -m 755 docker-machine /usr/local/bin/docker-machine-0.16.0 && rm -f docker-machine && ln -sf /usr/local/bin/docker-machine-0.16.0 /usr/local/bin/docker-machine
args:
warn: False
creates: /usr/local/bin/docker-machine-0.16.0
- name: install docker-machine-driver-kvm2
shell: curl -sLo docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && install -m 755 docker-machine-driver-kvm2 /usr/local/bin/docker-machine-driver-kvm2 && rm -f docker-machine-driver-kvm2
args:
warn: False
creates: /usr/local/bin/docker-machine-driver-kvm2

48
roles/k8s/tasks/main.yml Normal file
View File

@ -0,0 +1,48 @@
---
- 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.11.3/bin/linux/amd64/kubectl && install -m 755 /tmp/kubectl /usr/local/bin/kubectl-1.11.3 && rm -f /tmp/kubectl && ln -sf /usr/local/bin/kubectl-1.11.3 /usr/local/bin/kubectl
args:
warn: False
creates: /usr/local/bin/kubectl-1.11.3
- 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.10.0
- name: install minikube
shell: curl -sLo /tmp/minikube https://storage.googleapis.com/minikube/releases/v1.0.0/minikube-linux-amd64 && install -m 755 /tmp/minikube /usr/local/bin/minikube-1.0.0 && rm -f /tmp/minikube && ln -sf /usr/local/bin/minikube-1.0.0 /usr/local/bin/minikube
args:
warn: False
creates: /usr/local/bin/minikube-1.0.0
- 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:
creates: /usr/local/bin/helm-2.13.1

View File

@ -0,0 +1,30 @@
---
- name: add nextcloud pubkey
shell: curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x60EE47FBAD3DD469" | sudo apt-key add
args:
warn: False
- name: add nextcloud repo
apt_repository:
repo: "deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu bionic main"
state: present
update_cache: true
- name: add openrazer repo
apt_repository:
repo: "ppa:openrazer/stable"
state: present
update_cache: true
- name: add polychromatic repo
apt_repository:
repo: "ppa:polychromatic/stable"
state: present
update_cache: true
- name: install apt applications
apt:
name: openvpn,nextcloud-client,openrazer-meta,polychromatic
state: present
- name: install kitty terminal emulator
become: no
shell: curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin launch=n && ln -s ~/.local/kitty.app/bin/kitty ~/bin/ && mkdir -p ~/.local/share/applications && cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications && sed -i "s/Icon\=kitty/Icon\=\/home\/$USER\/.local\/kitty.app\/share\/icons\/hicolor\/256x256\/apps\/kitty.png/g" ~/.local/share/applications/kitty.desktop
args:
warn: False
creates: ~/bin/kitty