Ubuntu
This commit is contained in:
parent
8a58c3eeee
commit
ea78a81dc1
5 changed files with 126 additions and 18 deletions
|
@ -1,19 +1,23 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
PATH="$PATH:$HOME/.local/bin"
|
PATH="$PATH:$HOME/.local/bin"
|
||||||
|
|
||||||
if [[ `uname` == "Linux" ]]; then
|
if [[ $(command -v ansible) ]]; then
|
||||||
if [[ -f /etc/pacman.conf ]]; then
|
printf "ansible already installed"
|
||||||
ansible-playbook -i inventory arch.yml
|
elif [[ $(uname) == "Linux" ]]; then
|
||||||
elif [[ -f /etc/lsb-release ]]; then
|
if [[ $(command -v pacman) ]]; then
|
||||||
ansible-playbook -i inventory ubuntu.yml
|
sudo pacman -Sy ansible
|
||||||
elif [[ -f /etc/fedora-release ]]; then
|
elif [[ $(command -v apt) ]]; then
|
||||||
ansible-playbook -i inventory fedora.yml
|
sudo apt install -y ansible python3-apt
|
||||||
else
|
# ubuntu doesn't create a /usr/bin/python, so we have to make one ourselves
|
||||||
echo "can't autodetermine distro, just running default inventory"
|
ln -s /usr/bin/python3 /usr/bin/python
|
||||||
ansible-playbook -i inventory common.yml
|
elif [[ $(command -v dnf) ]]; then
|
||||||
|
sudo dnf install ansible -y
|
||||||
fi
|
fi
|
||||||
else
|
elif [[ $(uname) == "Darwin" ]]; then
|
||||||
ansible-playbook -i inventory osx.yml
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
/usr/local/bin/brew install ansible
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ansible-playbook -i inventory main.yml
|
||||||
|
|
|
@ -30,3 +30,25 @@
|
||||||
vars:
|
vars:
|
||||||
- dev_machine: "{{ _dev_machine }}"
|
- dev_machine: "{{ _dev_machine }}"
|
||||||
- rust_extras: "{{ _rust_extras }}"
|
- rust_extras: "{{ _rust_extras }}"
|
||||||
|
|
||||||
|
- hosts: os_Archlinux
|
||||||
|
gather_facts: True
|
||||||
|
roles:
|
||||||
|
- role: arch
|
||||||
|
vars:
|
||||||
|
dev_machine: "{{ _dev_machine }}"
|
||||||
|
- role: common
|
||||||
|
vars:
|
||||||
|
- dev_machine: "{{ _dev_machine }}"
|
||||||
|
- rust_extras: "{{ _rust_extras }}"
|
||||||
|
|
||||||
|
- hosts: os_Ubuntu
|
||||||
|
gather_facts: False
|
||||||
|
roles:
|
||||||
|
- role: ubuntu
|
||||||
|
vars:
|
||||||
|
dev_machine: "{{ _dev_machine }}"
|
||||||
|
- role: common
|
||||||
|
vars:
|
||||||
|
- dev_machine: "{{ _dev_machine }}"
|
||||||
|
- rust_extras: "{{ _rust_extras }}"
|
||||||
|
|
|
@ -1 +1,58 @@
|
||||||
|
---
|
||||||
|
- name: Update Packages
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
pacman:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: yes
|
||||||
|
|
||||||
|
- name: Install basics
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
pacman:
|
||||||
|
name:
|
||||||
|
- zsh
|
||||||
|
- git
|
||||||
|
- cmake
|
||||||
|
- tmux
|
||||||
|
- gnupg
|
||||||
|
- neovim
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: Install Development Tools
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
pacman:
|
||||||
|
name:
|
||||||
|
- base-devel
|
||||||
|
- openssl
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: clone yay from github
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
become: false
|
||||||
|
git:
|
||||||
|
repo: https://aur.archlinux.org/yay.git
|
||||||
|
dest: /tmp/yay
|
||||||
|
version: master
|
||||||
|
update: yes
|
||||||
|
# notify: makepkg -si
|
||||||
|
|
||||||
|
- name: makepkg --noconfirm -si
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
become: false
|
||||||
|
command: makepkg --noconfirm -si
|
||||||
|
args:
|
||||||
|
chdir: /tmp/yay
|
||||||
|
creates: /usr/bin/yay
|
||||||
|
|
||||||
|
- name: Install hstr
|
||||||
|
when:
|
||||||
|
- dev_machine == true
|
||||||
|
command: yay -Sy --noconfirm --needed --cleanafter hstr
|
||||||
|
args:
|
||||||
|
creates: /usr/local/bin/hstr
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
- tmux
|
- tmux
|
||||||
- gpg
|
- gpg
|
||||||
- neovim
|
- neovim
|
||||||
|
- hstr
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: Install @development-tools
|
- name: Install @development-tools
|
||||||
|
|
|
@ -2,20 +2,44 @@
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt:
|
apt:
|
||||||
|
force_apt_get: yes
|
||||||
name: "*"
|
name: "*"
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: Install neovim
|
- name: Install essentials
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt:
|
apt:
|
||||||
name: "neovim"
|
force_apt_get: yes
|
||||||
|
name:
|
||||||
|
- neovim
|
||||||
|
- git
|
||||||
|
- zsh
|
||||||
|
- tmux
|
||||||
|
- gpg
|
||||||
|
- software-properties-common
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: Install build-essential
|
- name: Install Development Tools
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt:
|
apt:
|
||||||
name: "build-essential"
|
force_apt_get: yes
|
||||||
|
name:
|
||||||
|
- build-essential
|
||||||
|
- cmake
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
# - name: Add hstr repo
|
||||||
|
# become: yes
|
||||||
|
# become_method: sudo
|
||||||
|
# command: "add-apt-repository ppa:acicchetti/utils"
|
||||||
|
|
||||||
|
# - name: Install hstr
|
||||||
|
# become: yes
|
||||||
|
# become_method: sudo
|
||||||
|
# apt:
|
||||||
|
# force_apt_get: yes
|
||||||
|
# name: hstr
|
||||||
|
# state: latest
|
||||||
|
# update_cache: yes
|
||||||
|
|
Loading…
Add table
Reference in a new issue