mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
update
This commit is contained in:
@@ -2,7 +2,5 @@ FROM fedora
|
||||
WORKDIR /app
|
||||
RUN yum update -y && yum install -y \
|
||||
ansible
|
||||
COPY requirements.yml /app
|
||||
RUN ansible-galaxy collection install -r requirements.yml
|
||||
COPY . /app
|
||||
RUN ansible-playbook /app/playbooks/image.yml
|
||||
|
||||
14
playbooks/roles/software/atuin/defaults/main.yml
Normal file
14
playbooks/roles/software/atuin/defaults/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
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"
|
||||
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: info
|
||||
- role: system
|
||||
30
playbooks/roles/software/atuin/tasks/main.yml
Normal file
30
playbooks/roles/software/atuin/tasks/main.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
- 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"
|
||||
14
playbooks/roles/software/starship/defaults/main.yml
Normal file
14
playbooks/roles/software/starship/defaults/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
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"
|
||||
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: info
|
||||
- role: system
|
||||
30
playbooks/roles/software/starship/tasks/main.yml
Normal file
30
playbooks/roles/software/starship/tasks/main.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
- name: Download starship
|
||||
tags: always
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ download_url }}"
|
||||
dest: "{{ download_dir }}"
|
||||
|
||||
- name: Create dir
|
||||
tags: always
|
||||
ansible.builtin.file:
|
||||
path: "{{ unpack_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: Extract starship
|
||||
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"
|
||||
@@ -2,4 +2,3 @@
|
||||
dependencies:
|
||||
- role: info
|
||||
- role: system
|
||||
# - elliotweiser.osx-command-line-tools
|
||||
|
||||
@@ -22,25 +22,23 @@
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Clone nvm
|
||||
- name: Install atuin
|
||||
tags:
|
||||
- install
|
||||
ansible.builtin.git:
|
||||
accept_newhostkey: true
|
||||
clone: true
|
||||
force: true
|
||||
recursive: false
|
||||
repo: https://github.com/nvm-sh/nvm
|
||||
dest: "{{ home }}/.nvm"
|
||||
include_role:
|
||||
name: software/atuin
|
||||
|
||||
- name: Install node and set version
|
||||
- name: Install starship
|
||||
tags:
|
||||
- install
|
||||
include_role:
|
||||
name: software/starship
|
||||
|
||||
- name: Setup node
|
||||
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
|
||||
- install
|
||||
include_tasks: "nvm.yml"
|
||||
|
||||
- name: Setup nvim
|
||||
tags:
|
||||
|
||||
19
playbooks/roles/terminal/tasks/nvm.yml
Normal file
19
playbooks/roles/terminal/tasks/nvm.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- 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
|
||||
5
playbooks/test.yml
Normal file
5
playbooks/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Setup host
|
||||
hosts: localhost
|
||||
roles:
|
||||
- software/atuin
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
roles:
|
||||
- name: elliotweiser.osx-command-line-tools
|
||||
- name: andrewrothstein.starship
|
||||
Reference in New Issue
Block a user