diff --git a/roles/development_workstation/defaults/main.yml b/roles/development_workstation/defaults/main.yml index 99d92a6..9fc92eb 100644 --- a/roles/development_workstation/defaults/main.yml +++ b/roles/development_workstation/defaults/main.yml @@ -3,4 +3,4 @@ third_party_src: "{{ home }}/vendor" fd_package: fd-find redis_package: redis -rtx_package: rtx +mise_package: mise diff --git a/roles/development_workstation/tasks/main.yml b/roles/development_workstation/tasks/main.yml index 30833d4..1848b81 100644 --- a/roles/development_workstation/tasks/main.yml +++ b/roles/development_workstation/tasks/main.yml @@ -35,7 +35,7 @@ path: /usr/bin/gawk when: ansible_facts["os_family"] == "Debian" -- ansible.builtin.import_tasks: rtx.yml +- ansible.builtin.import_tasks: mise.yml - ansible.builtin.import_tasks: neovim.yml - ansible.builtin.import_tasks: redis.yml - ansible.builtin.import_tasks: fzy.yml diff --git a/roles/development_workstation/tasks/mise.yml b/roles/development_workstation/tasks/mise.yml new file mode 100644 index 0000000..21caa82 --- /dev/null +++ b/roles/development_workstation/tasks/mise.yml @@ -0,0 +1,46 @@ +--- +- name: Add mise yum repository + become: true + ansible.builtin.yum_repository: + name: mise + description: mise-en-place + baseurl: https://mise.jdx.dev/rpm + enabled: true + gpgcheck: true + gpgkey: http://mise.jdx.dev/gpg-key.pub + when: ansible_facts["os_family"] == "RedHat" + tags: + - mise + +- name: Add mise apt repository + become: true + when: ansible_facts["os_family"] == "Debian" + tags: + - mise + block: + - name: Fetch mise repo signing key + ansible.builtin.get_url: + url: https://mise.jdx.dev/gpg-key.pub + dest: /etc/apt/trusted.gpg.d/mise.asc + checksum: sha256:bf3bedf8b33a9486ba1a2f488b3fc59c6080b7a06fb7e5d3deac3ffa6aaaf2e2 + mode: "0644" + + - name: Add mise apt repository + when: ansible_architecture == "aarch64" + ansible.builtin.apt_repository: + repo: deb [signed-by=/etc/apt/trusted.gpg.d/mise.asc arch=arm64] https://mise.jdx.dev/deb stable main + state: present + + - name: Add mise apt repository + when: ansible_architecture != "aarch64" + ansible.builtin.apt_repository: + repo: deb [signed-by=/etc/apt/trusted.gpg.d/mise.asc arch={{ ansible_architecture }}] https://mise.jdx.dev/deb stable main + state: present + +- name: Install mise + become: "{{ elevate_for_package_installation }}" + ansible.builtin.package: + name: "{{ mise_package }}" + state: present + tags: + - mise diff --git a/roles/development_workstation/tasks/rtx.yml b/roles/development_workstation/tasks/rtx.yml deleted file mode 100644 index b2cc66c..0000000 --- a/roles/development_workstation/tasks/rtx.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -- name: Add rtx yum repository - become: true - ansible.builtin.yum_repository: - name: rtx - description: rtx - baseurl: https://rtx.pub/rpm - enabled: true - gpgcheck: true - gpgkey: http://rtx.pub/gpg-key.pub - when: ansible_facts["os_family"] == "RedHat" - tags: - - rtx - -- name: Add rtx apt repository - become: true - when: ansible_facts["os_family"] == "Debian" - tags: - - rtx - block: - - name: Fetch rtx repo signing key - ansible.builtin.get_url: - url: https://rtx.pub/gpg-key.pub - dest: /etc/apt/trusted.gpg.d/rtx.asc - checksum: sha256:bf3bedf8b33a9486ba1a2f488b3fc59c6080b7a06fb7e5d3deac3ffa6aaaf2e2 - mode: "0644" - - - name: Add rtx apt repository - when: ansible_architecture == "aarch64" - ansible.builtin.apt_repository: - repo: deb [signed-by=/etc/apt/trusted.gpg.d/rtx.asc arch=arm64] https://rtx.pub/deb stable main - state: present - - - name: Add rtx apt repository - when: ansible_architecture != "aarch64" - ansible.builtin.apt_repository: - repo: deb [signed-by=/etc/apt/trusted.gpg.d/rtx.asc arch={{ ansible_architecture }}] https://rtx.pub/deb stable main - state: present - -- name: Install rtx via Homebrew - when: ansible_facts["os_family"] == "Darwin" - tags: - - rtx - block: - - name: Add rtx Homebrew tap - community.general.homebrew_tap: - name: jdxcode/tap - state: present - -- name: Install rtx - become: "{{ elevate_for_package_installation }}" - ansible.builtin.package: - name: "{{ rtx_package }}" - state: present - tags: - - rtx