mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
cleanup
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
/.venv/
|
/.venv/
|
||||||
|
/.vagrant/
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{"dependencies":[["racc",["~> 1.4"]],["nokogiri",["~> 1.6"]],["diffy",[">= 0"]],["rexml",[">= 0"]],["xml-simple",[">= 0"]],["mime-types-data",["~> 3.2015"]],["mime-types",[">= 0"]],["formatador",[">= 0.2","< 2.0"]],["excon",["~> 0.71"]],["builder",[">= 0"]],["fog-core",["~> 2"]],["json",[">= 0"]],["ruby-libvirt",[">= 0.7.0"]],["fog-xml",["~> 0.1.1"]],["multi_json",["~> 1.10"]],["fog-json",[">= 0"]],["fog-libvirt",[">= 0.6.0"]],["vagrant-libvirt",["= 0.12.2"]],["vagrant-qemu",["= 0.3.6"]]],"checksum":"d29c877f7d936a4ed482393f2146efe63cd2dcecac3c1ae41fbb8ca2d854a211","vagrant_version":"2.4.1"}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/Users/alice/Projects/private/system
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# Copyright (c) HashiCorp, Inc.
|
|
||||||
# SPDX-License-Identifier: BUSL-1.1
|
|
||||||
|
|
||||||
# This file loads the proper rgloader/loader.rb file that comes packaged
|
|
||||||
# with Vagrant so that encoded files can properly run with Vagrant.
|
|
||||||
|
|
||||||
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
|
|
||||||
require File.expand_path(
|
|
||||||
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
|
|
||||||
else
|
|
||||||
raise "Encoded files can't be read outside of the Vagrant installer."
|
|
||||||
end
|
|
||||||
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@@ -2,7 +2,7 @@
|
|||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.provider "virtualbox"
|
config.vm.provider "virtualbox"
|
||||||
config.vm.box = "archlinux/archlinux"
|
config.vm.box = "generic/fedora39"
|
||||||
config.vm.provision "ansible" do |ansible|
|
config.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = "playbooks/setup.yml"
|
ansible.playbook = "playbooks/setup.yml"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,8 +3,19 @@ images:
|
|||||||
docker-dev:
|
docker-dev:
|
||||||
contexts:
|
contexts:
|
||||||
- privat
|
- privat
|
||||||
|
android:
|
||||||
|
hosts:
|
||||||
|
pixel9:
|
||||||
|
ansible_host: 192.168.3.7
|
||||||
|
ansible_connection: ssh
|
||||||
|
ansible_port: 8022
|
||||||
|
ansible_user: u0_a200
|
||||||
desktops:
|
desktops:
|
||||||
hosts:
|
hosts:
|
||||||
zn-macbook:
|
zn-macbook:
|
||||||
|
ansible_host: 192.168.3.3
|
||||||
|
ansible_connection: ssh
|
||||||
|
ansible_port: 22
|
||||||
|
ansible_user: alice
|
||||||
contexts:
|
contexts:
|
||||||
- zeronorth
|
- zeronorth
|
||||||
|
|||||||
1
notes.md
Normal file
1
notes.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
https://github.com/hashicorp/vagrant/issues/13501#issuecomment-2394397587
|
||||||
@@ -2,4 +2,5 @@
|
|||||||
- name: Setup host
|
- name: Setup host
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- role: terminal
|
- role: env_terminal
|
||||||
|
- role: env_develop
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
- name: Show info
|
||||||
|
debug:
|
||||||
|
msg:
|
||||||
|
user: "{{ ansible_user }}"
|
||||||
|
home: "{{ ansible_env.HOME }}"
|
||||||
|
distribution: "{{ ansible_distribution }}"
|
||||||
|
family: "{{ ansible_os_family}}"
|
||||||
|
arch: "{{ ansible_architecture }}"
|
||||||
|
|
||||||
- name: Setting host facts
|
- name: Setting host facts
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
2
playbooks/roles/base_system/meta/main.yml
Normal file
2
playbooks/roles/base_system/meta/main.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
export TMPDIR="${TMPDIR:-/tmp}"
|
||||||
|
export PATH="$PATH:$HOME/.local/bin"
|
||||||
|
|
||||||
alias ls=eza
|
alias ls=eza
|
||||||
alias cat=bat
|
alias cat=bat
|
||||||
alias grep=rg
|
alias grep=rg
|
||||||
3
playbooks/roles/base_terminal/meta/main.yml
Normal file
3
playbooks/roles/base_terminal/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
with_community.general.filetree:
|
with_community.general.filetree:
|
||||||
14
playbooks/roles/base_terminal/vars/default/default.yml
Normal file
14
playbooks/roles/base_terminal/vars/default/default.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
terminal_pkgs:
|
||||||
|
- bat
|
||||||
|
- eza
|
||||||
|
- direnv
|
||||||
|
- fzf
|
||||||
|
- gnupg
|
||||||
|
- jq
|
||||||
|
- ripgrep
|
||||||
|
- neovim
|
||||||
|
- gh
|
||||||
|
- tmux
|
||||||
|
- zoxide
|
||||||
|
- sshpass
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
dependencies:
|
|
||||||
- role: info
|
|
||||||
- role: system
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
dev_pkgs: []
|
|
||||||
dev_casks: []
|
|
||||||
dev_flatpaks: []
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
dependencies:
|
|
||||||
- role: info
|
|
||||||
- role: system
|
|
||||||
3
playbooks/roles/env_desktop/meta/main.yml
Normal file
3
playbooks/roles/env_desktop/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
3
playbooks/roles/env_develop/meta/main.yml
Normal file
3
playbooks/roles/env_develop/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
20
playbooks/roles/env_develop/tasks/main.yml
Normal file
20
playbooks/roles/env_develop/tasks/main.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
- name: "Load vars : {{ context }}"
|
||||||
|
ansible.builtin.include_vars: "{{ item }}"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
with_first_found:
|
||||||
|
- files:
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
- "{{ ansible_distribution }}.yml"
|
||||||
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
- default.yml
|
||||||
|
paths: ../vars
|
||||||
|
skip: true
|
||||||
|
|
||||||
|
- name: "Install dependencies"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: env_develop_pkgs
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ env_develop_pkgs }}"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
dev_pkgs:
|
env_develop_pkgs:
|
||||||
- rustup
|
- rustup
|
||||||
- python3
|
- python3
|
||||||
11
playbooks/roles/env_terminal/meta/main.yml
Normal file
11
playbooks/roles/env_terminal/meta/main.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: software_git
|
||||||
|
- role: software_zsh
|
||||||
|
- role: software_starship
|
||||||
|
- role: software_tmux
|
||||||
|
- role: software_ssh
|
||||||
|
- role: software_nvm
|
||||||
|
- role: software_nvim
|
||||||
|
- role: software_atuin
|
||||||
@@ -1,4 +1,17 @@
|
|||||||
---
|
---
|
||||||
|
- name: Copy config {{ context }}
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files/{{ context }}
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
- name: "Copy templates : {{ context }}"
|
- name: "Copy templates : {{ context }}"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
@@ -12,7 +25,7 @@
|
|||||||
label: "{{ item.path }}"
|
label: "{{ item.path }}"
|
||||||
when: item.state == 'file'
|
when: item.state == 'file'
|
||||||
|
|
||||||
- name: "Copy config : {{ context }}"
|
- name: Copy config {{ context }}
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
33
playbooks/roles/env_terminal/tasks/install.yml
Normal file
33
playbooks/roles/env_terminal/tasks/install.yml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
- name: "Unload vars : {{ context }}"
|
||||||
|
ansible.builtin.include_vars: ../vars/empty.yml
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
|
||||||
|
- name: "Load vars : {{ context }}"
|
||||||
|
ansible.builtin.include_vars: "{{ item }}"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
with_first_found:
|
||||||
|
- files:
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
- "{{ ansible_distribution }}.yml"
|
||||||
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
- default.yml
|
||||||
|
paths: ../vars/{{ context }}
|
||||||
|
skip: true
|
||||||
|
|
||||||
|
- name: "Install dependencies : {{ context }}"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: terminal_pkgs
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ terminal_pkgs }}"
|
||||||
|
|
||||||
|
- name: "Install casks : {{ context }}"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: terminal_casks
|
||||||
|
community.general.homebrew_cask:
|
||||||
|
name: "{{ terminal_casks }}"
|
||||||
|
state: installed
|
||||||
22
playbooks/roles/env_terminal/tasks/main.yml
Normal file
22
playbooks/roles/env_terminal/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
- name: Install context dependencies
|
||||||
|
ansible.builtin.include_tasks: install.yml
|
||||||
|
loop: "{{ contexts }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: context
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
|
||||||
|
- name: Install atuin
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: software_atuin
|
||||||
|
|
||||||
|
- name: Configure contexts
|
||||||
|
ansible.builtin.include_tasks: config.yml
|
||||||
|
loop: "{{ contexts }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: context
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
4
playbooks/roles/env_terminal/vars/empty.yml
Normal file
4
playbooks/roles/env_terminal/vars/empty.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
terminal_pkgs: []
|
||||||
|
terminal_casks: []
|
||||||
|
terminal_flatpaks: []
|
||||||
5
playbooks/roles/env_terminal/vars/zeronorth/default.yml
Normal file
5
playbooks/roles/env_terminal/vars/zeronorth/default.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
terminal_pkgs:
|
||||||
|
- terraform
|
||||||
|
- awscli
|
||||||
|
- copier
|
||||||
3
playbooks/roles/server_ssh/meta/main.yml
Normal file
3
playbooks/roles/server_ssh/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
39
playbooks/roles/server_ssh/tasks/main.yml
Normal file
39
playbooks/roles/server_ssh/tasks/main.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: "Copy templates"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../templates
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
mirror: "https://github.com/atuinsh/atuin/releases/download/"
|
|
||||||
version: v18.3.0
|
|
||||||
arch_map:
|
|
||||||
arm64: aarch64
|
|
||||||
aarch64: aarch64
|
|
||||||
system_map:
|
|
||||||
Darwin: apple-darwin
|
|
||||||
Linux: unknown-linux-gnu
|
|
||||||
|
|
||||||
atuin_url: "{{ mirror }}/{{version}}/atuin-{{ arch_map[ansible_architecture] }}-{{ system_map[ansible_system] }}.tar.gz"
|
|
||||||
download_dir: "/tmp/atuin.tar.gz"
|
|
||||||
unpack_dir: "/tmp/atuin"
|
|
||||||
unpack_file: "{{ unpack_dir }}/atuin-{{ arch_map[ansible_architecture] }}-{{ system_map[ansible_system] }}/atuin"
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
dependencies:
|
|
||||||
- role: info
|
|
||||||
- role: system
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
- name: Download atuin
|
|
||||||
tags: always
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "{{ atuin_url }}"
|
|
||||||
dest: "{{ download_dir }}"
|
|
||||||
|
|
||||||
- name: Create dir
|
|
||||||
tags: always
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ unpack_dir }}"
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Extract foo.tgz into /var/lib/foo
|
|
||||||
tags: always
|
|
||||||
ansible.builtin.unarchive:
|
|
||||||
src: "{{ download_dir }}"
|
|
||||||
dest: "{{ unpack_dir }}"
|
|
||||||
|
|
||||||
- name: Ensure dir
|
|
||||||
tags: always
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ home }}/.scripts"
|
|
||||||
state: directory
|
|
||||||
- name: Move bin
|
|
||||||
tags: always
|
|
||||||
ansible.builtin.copy:
|
|
||||||
remote_src: true
|
|
||||||
mode: 755
|
|
||||||
src: "{{ unpack_file }}"
|
|
||||||
dest: "{{ home }}/.scripts/atuin"
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
mirror: "https://github.com/starship/starship/releases/download/"
|
|
||||||
version: v1.20.1
|
|
||||||
arch_map:
|
|
||||||
arm64: aarch64
|
|
||||||
aarch64: aarch64
|
|
||||||
system_map:
|
|
||||||
Darwin: apple-darwin
|
|
||||||
Linux: unknown-linux-musl
|
|
||||||
|
|
||||||
download_url: "{{ mirror }}/{{version}}/starship-{{ arch_map[ansible_architecture] }}-{{ system_map[ansible_system] }}.tar.gz"
|
|
||||||
download_dir: "/tmp/starship.tar.gz"
|
|
||||||
unpack_dir: "/tmp/starship"
|
|
||||||
unpack_file: "{{ unpack_dir }}/starship"
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
dependencies:
|
|
||||||
- role: info
|
|
||||||
- role: system
|
|
||||||
14
playbooks/roles/software_atuin/defaults/main.yml
Normal file
14
playbooks/roles/software_atuin/defaults/main.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
software_atuin_mirror: https://github.com/atuinsh/atuin/releases/download/
|
||||||
|
software_atuin_version: v18.3.0
|
||||||
|
software_atuin_arch_map:
|
||||||
|
arm64: aarch64
|
||||||
|
aarch64: aarch64
|
||||||
|
software_atuin_system_map:
|
||||||
|
Darwin: apple-darwin
|
||||||
|
Linux: unknown-linux-gnu
|
||||||
|
|
||||||
|
software_atuin_download_url: "{{ software_atuin_mirror }}/{{ software_atuin_version }}/atuin-{{ software_atuin_arch_map[ansible_architecture] }}-{{ software_atuin_system_map[ansible_system] }}.tar.gz"
|
||||||
|
software_atuin_download_dir: /tmp/atuin.tar.gz
|
||||||
|
software_atuin_unpack_dir: /tmp/atuin
|
||||||
|
software_atuin_unpack_file: "{{ software_atuin_unpack_dir }}/atuin-{{ software_atuin_arch_map[ansible_architecture] }}-{{ software_atuin_system_map[ansible_system] }}/atuin"
|
||||||
4
playbooks/roles/software_atuin/meta/main.yml
Normal file
4
playbooks/roles/software_atuin/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
60
playbooks/roles/software_atuin/tasks/main.yml
Normal file
60
playbooks/roles/software_atuin/tasks/main.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
---
|
||||||
|
- name: Download atuin
|
||||||
|
tags: always
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "{{ software_atuin_download_url }}"
|
||||||
|
dest: "{{ software_atuin_download_dir }}"
|
||||||
|
mode: "0600"
|
||||||
|
|
||||||
|
- name: Create dir
|
||||||
|
tags: always
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ software_atuin_unpack_dir }}"
|
||||||
|
mode: "0755"
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Unpacking atuin
|
||||||
|
tags: always
|
||||||
|
ansible.builtin.unarchive:
|
||||||
|
src: "{{ software_atuin_download_dir }}"
|
||||||
|
dest: "{{ software_atuin_unpack_dir }}"
|
||||||
|
|
||||||
|
- name: Ensure dir
|
||||||
|
tags: always
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ home }}/.scripts"
|
||||||
|
mode: "0755"
|
||||||
|
state: directory
|
||||||
|
- name: Move bin
|
||||||
|
tags: always
|
||||||
|
ansible.builtin.copy:
|
||||||
|
remote_src: true
|
||||||
|
mode: "0755"
|
||||||
|
src: "{{ software_atuin_unpack_file }}"
|
||||||
|
dest: "{{ home }}/.local/bin/atuin"
|
||||||
|
|
||||||
|
- name: Setup config dirctories
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: Copy config {{ context }}
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
3
playbooks/roles/software_docker/meta/main.yml
Normal file
3
playbooks/roles/software_docker/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
3
playbooks/roles/software_git/meta/main.yml
Normal file
3
playbooks/roles/software_git/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
47
playbooks/roles/software_git/tasks/main.yml
Normal file
47
playbooks/roles/software_git/tasks/main.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
- name: Install dependencies
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
- git-delta
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: "Copy templates"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../templates
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
4
playbooks/roles/software_nvim/meta/main.yml
Normal file
4
playbooks/roles/software_nvim/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
- config
|
- config
|
||||||
- nvim
|
- nvim
|
||||||
register: nviminstall
|
register: nviminstall
|
||||||
changed_when: "nviminstall.stdout != ''"
|
changed_when: nviminstall.stdout != ''
|
||||||
ansible.builtin.shell: nvim --headless +q
|
ansible.builtin.shell: nvim --headless +q
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
56
playbooks/roles/software_nvim/tasks/main.yml
Normal file
56
playbooks/roles/software_nvim/tasks/main.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
- name: Install dependencies
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- neovim
|
||||||
|
- git
|
||||||
|
|
||||||
|
- name: Setup config dirctories
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: Copy config {{ context }}
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
|
|
||||||
|
- name: Configure neovim
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- nvim
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://github.com/morten-olsen/nvim
|
||||||
|
dest: "{{ home }}/.config/nvim"
|
||||||
|
accept_newhostkey: true
|
||||||
|
clone: true
|
||||||
|
update: true
|
||||||
|
force: true
|
||||||
|
|
||||||
|
- name: Prepare neovim
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- nvim
|
||||||
|
register: nviminstall
|
||||||
|
changed_when: nviminstall.stdout != ''
|
||||||
|
ansible.builtin.shell: nvim --headless +q
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
4
playbooks/roles/software_nvm/meta/main.yml
Normal file
4
playbooks/roles/software_nvm/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
51
playbooks/roles/software_nvm/tasks/main.yml
Normal file
51
playbooks/roles/software_nvm/tasks/main.yml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
- name: Install dependencies
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
|
||||||
|
- name: Clone nvm
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
ansible.builtin.git:
|
||||||
|
accept_newhostkey: true
|
||||||
|
clone: true
|
||||||
|
force: true
|
||||||
|
recursive: false
|
||||||
|
repo: https://github.com/nvm-sh/nvm
|
||||||
|
dest: "{{ home }}/.nvm"
|
||||||
|
|
||||||
|
- name: Install node and set version
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
register: nodeinstall
|
||||||
|
ansible.builtin.shell: source {{ home }}/.nvm/nvm.sh && nvm install 22
|
||||||
|
changed_when: "'is already installed' not in nodeinstall.stderr"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
|
- name: Setup config dirctories
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: Copy config {{ context }}
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
4
playbooks/roles/software_ssh/meta/main.yml
Normal file
4
playbooks/roles/software_ssh/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
0
playbooks/roles/software_ssh/tasks/main.yml
Normal file
0
playbooks/roles/software_ssh/tasks/main.yml
Normal file
14
playbooks/roles/software_starship/defaults/main.yml
Normal file
14
playbooks/roles/software_starship/defaults/main.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
software_starship_mirror: "https://github.com/starship/starship/releases/download/"
|
||||||
|
software_starship_version: v1.20.1
|
||||||
|
software_starship_arch_map:
|
||||||
|
arm64: aarch64
|
||||||
|
aarch64: aarch64
|
||||||
|
software_starship_system_map:
|
||||||
|
Darwin: apple-darwin
|
||||||
|
Linux: unknown-linux-musl
|
||||||
|
|
||||||
|
software_starship_download_url: "{{ software_starship_mirror }}/{{ software_starship_version }}/starship-{{ software_starship_arch_map[ansible_architecture] }}-{{ software_starship_system_map[ansible_system] }}.tar.gz"
|
||||||
|
software_starship_download_dir: "/tmp/starship.tar.gz"
|
||||||
|
software_starship_unpack_dir: "/tmp/starship"
|
||||||
|
software_starship_unpack_file: "{{ software_starship_unpack_dir }}/starship"
|
||||||
4
playbooks/roles/software_starship/meta/main.yml
Normal file
4
playbooks/roles/software_starship/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
@@ -1,30 +1,34 @@
|
|||||||
- name: Download starship
|
- name: Download starship
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ download_url }}"
|
mode: "0600"
|
||||||
dest: "{{ download_dir }}"
|
url: "{{ software_starship_download_url }}"
|
||||||
|
dest: "{{ software_starship_download_dir }}"
|
||||||
|
|
||||||
- name: Create dir
|
- name: Create dir
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ unpack_dir }}"
|
mode: "0755"
|
||||||
|
path: "{{ software_starship_unpack_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Extract starship
|
- name: Extract starship
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "{{ download_dir }}"
|
src: "{{ software_starship_download_dir }}"
|
||||||
dest: "{{ unpack_dir }}"
|
dest: "{{ software_starship_unpack_dir }}"
|
||||||
|
|
||||||
- name: Ensure dir
|
- name: Ensure dir
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
mode: "0755"
|
||||||
path: "{{ home }}/.scripts"
|
path: "{{ home }}/.scripts"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Move bin
|
- name: Move bin
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
mode: 755
|
mode: "0755"
|
||||||
src: "{{ unpack_file }}"
|
src: "{{ software_starship_unpack_file }}"
|
||||||
dest: "{{ home }}/.scripts/atuin"
|
dest: "{{ home }}/.local/bin/starship"
|
||||||
4
playbooks/roles/software_tmux/meta/main.yml
Normal file
4
playbooks/roles/software_tmux/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
39
playbooks/roles/software_tmux/tasks/main.yml
Normal file
39
playbooks/roles/software_tmux/tasks/main.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: "Copy templates"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../templates
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
4
playbooks/roles/software_zsh/meta/main.yml
Normal file
4
playbooks/roles/software_zsh/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: base_info
|
||||||
|
- role: base_terminal
|
||||||
54
playbooks/roles/software_zsh/tasks/main.yml
Normal file
54
playbooks/roles/software_zsh/tasks/main.yml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
---
|
||||||
|
- name: Install core dependencies
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- zsh
|
||||||
|
|
||||||
|
- name: Set shell
|
||||||
|
become: true
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: "{{ username }}"
|
||||||
|
shell: /usr/bin/zsh
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.file:
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
path: "{{ home }}/{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
|
- name: "Copy templates"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../templates
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_community.general.filetree:
|
||||||
|
- ../files
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path }}"
|
||||||
|
when: item.state == 'file'
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
dependencies:
|
|
||||||
- role: info
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export TMPDIR="${TMPDIR:-/tmp}"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export PATH="$PATH:$HOME/.scripts"
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export GPG_TTY="$(tty)"
|
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
||||||
gpgconf --launch gpg-agent
|
|
||||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
dependencies:
|
|
||||||
- role: info
|
|
||||||
- role: system
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install core dependencies
|
|
||||||
tags:
|
|
||||||
- install
|
|
||||||
ansible.builtin.package:
|
|
||||||
name:
|
|
||||||
- zsh
|
|
||||||
|
|
||||||
- name: Set shell
|
|
||||||
become: true
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: "{{ username }}"
|
|
||||||
shell: /usr/bin/zsh
|
|
||||||
|
|
||||||
- name: Install context dependencies
|
|
||||||
ansible.builtin.include_tasks: install.yml
|
|
||||||
loop: "{{ contexts }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: context
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
|
|
||||||
- name: Install atuin
|
|
||||||
tags:
|
|
||||||
- install
|
|
||||||
include_role:
|
|
||||||
name: software/atuin
|
|
||||||
|
|
||||||
- name: Install starship
|
|
||||||
tags:
|
|
||||||
- install
|
|
||||||
include_role:
|
|
||||||
name: software/starship
|
|
||||||
|
|
||||||
- name: Setup node
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
- install
|
|
||||||
include_tasks: "nvm.yml"
|
|
||||||
|
|
||||||
- name: Setup nvim
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
- nvim
|
|
||||||
include_tasks: "nvim.yml"
|
|
||||||
|
|
||||||
- name: Configure contexts
|
|
||||||
ansible.builtin.include_tasks: config.yml
|
|
||||||
loop: "{{ contexts }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: context
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
- name: Clone nvm
|
|
||||||
tags:
|
|
||||||
- install
|
|
||||||
ansible.builtin.git:
|
|
||||||
accept_newhostkey: true
|
|
||||||
clone: true
|
|
||||||
force: true
|
|
||||||
recursive: false
|
|
||||||
repo: https://github.com/nvm-sh/nvm
|
|
||||||
dest: "{{ home }}/.nvm"
|
|
||||||
|
|
||||||
- name: Install node and set version
|
|
||||||
tags:
|
|
||||||
- config
|
|
||||||
register: nodeinstall
|
|
||||||
ansible.builtin.shell: source {{ home }}/.nvm/nvm.sh && nvm install 22
|
|
||||||
changed_when: "'is already installed' not in nodeinstall.stderr"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user