Skip to content

Commit 7340099

Browse files
committed
feat(mise)!: move tools and versions from config.yaml to mise/config.toml
1 parent 34c92bf commit 7340099

File tree

4 files changed

+8
-78
lines changed

4 files changed

+8
-78
lines changed

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ flowchart TD
5555
B --> D["./install_brew.sh"]
5656
5757
B --> E["./ansible.sh"]
58-
E --> F["install community.general, prompt if needed"]
58+
E --> F["install community.general, prompt for password if needed"]
5959
E --> G["ansible-playbook ... main.yaml"]
6060
```
6161

docs/what-how-and-why.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ handled by the [primary
4040
playbook](https://github.com/shmileee/dotfiles/blob/master/scripts/common/ansible/main.yaml),
4141
which sets up the system and dotfiles. You can customize the configuration in
4242
[`config.yaml`](https://github.com/shmileee/dotfiles/blob/master/scripts/common/ansible/config.yaml),
43-
where you’ll typically specify packages, versions (for tools managed by
44-
`mise`), and other preferences. The
43+
where you’ll typically specify packages and other preferences. The
4544
[`dotfiles{}`](https://github.com/shmileee/dotfiles/blob/master/scripts/common/ansible/config.yaml#L86-L88)
4645
dictionary defines which repository and branch `chezmoi` will use to install
4746
your dotfiles from.
47+
[`mise/config.toml`](https://github.com/shmileee/dotfiles/blob/master/config/private_dot_config/mise/config.toml)
48+
defines what tools and runtimes are managed with `mise`.
4849

4950
!!! warning
5051

scripts/common/ansible/config.yaml

-43
Original file line numberDiff line numberDiff line change
@@ -104,49 +104,6 @@ neovim:
104104
- pkg-config
105105
- unzip
106106

107-
mise_tools:
108-
core:
109-
- name: "python"
110-
versions:
111-
- 3.11.8
112-
113-
- name: "go"
114-
versions:
115-
- 1.23.4
116-
- 1.21.0
117-
118-
- name: "ruby"
119-
versions:
120-
- 3.3.6
121-
122-
- name: "node"
123-
versions:
124-
- 21.2.0
125-
aqua:
126-
- name: "terraform"
127-
versions:
128-
- 1.10.2
129-
130-
- name: "terraform-ls"
131-
versions:
132-
- 0.36.2
133-
134-
- name: "kubectl"
135-
versions:
136-
- 1.32.0
137-
138-
- name: "helm"
139-
versions:
140-
- 3.16.3
141-
142-
- name: "pre-commit"
143-
versions:
144-
- 4.0.1
145-
146-
- name: "terramate"
147-
versions:
148-
- 0.11.4
149-
150107
golang:
151108
path: "{{ ansible_user_dir }}/.go"
152109
packages:
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
11
---
2-
- name: "core :: install tools"
2+
- name: "install tools"
33
ansible.builtin.command: >
4-
mise install {{ item.0.name }}@{{ item.1 }}
5-
args:
6-
creates: ".local/share/mise/installs/{{ item.0.name }}/{{ item.1 }}"
7-
chdir: "{{ ansible_user_dir }}"
8-
with_subelements:
9-
- "{{ mise_tools.core }}"
10-
- versions
11-
when: mise_tools.core | length > 0
12-
13-
- name: "core :: set the newest version as default"
14-
ansible.builtin.command: >
15-
mise use --global {{ item.name }}@{{ item.versions | sort | last }}
16-
loop: "{{ mise_tools.core }}"
17-
when: mise_tools.core | length > 0
18-
19-
- name: "extra :: install tools with `aqua` backend"
20-
ansible.builtin.command: >
21-
mise use --global aqua:{{ item.0.name }}@{{ item.1 }}
22-
args:
23-
creates: ".local/share/mise/installs/aqua-{{ item.0.name }}/{{ item.1 }}"
24-
chdir: "{{ ansible_user_dir }}"
25-
with_subelements:
26-
- "{{ mise_tools.aqua }}"
27-
- versions
28-
when: mise_tools.aqua | length > 0
29-
30-
- name: "extra :: set the newest version as default"
31-
ansible.builtin.command: >
32-
mise use --global {{ item.name }}@{{ item.versions | sort | last }}
33-
loop: "{{ mise_tools.core }}"
34-
when: mise_tools.core | length > 0
4+
mise install
5+
register: mise_install_result
6+
changed_when: "'all runtimes are installed' not in mise_install_result.stderr"

0 commit comments

Comments
 (0)