-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9264a74
commit 079f316
Showing
17 changed files
with
133 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
12 changes: 6 additions & 6 deletions
12
...oles/all/tasks/install-asdf-utilities.yml → ...roles/all/tasks/install-rtx-utilities.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
--- | ||
- name: Install asdf plugins | ||
- name: Install rtx plugins | ||
ansible.builtin.import_role: | ||
name: common | ||
tasks_from: asdf | ||
tasks_from: rtx | ||
vars: | ||
asdf_plugins: | ||
rtx_plugins: | ||
- name: nodejs | ||
- name: python | ||
|
||
- name: Install tldr | ||
- name: Install Node utilities | ||
ansible.builtin.import_role: | ||
name: common | ||
tasks_from: npm | ||
vars: | ||
package_names: [tldr] | ||
|
||
- name: Install pip_search | ||
- name: Install Python utilities | ||
ansible.builtin.import_role: | ||
name: common | ||
tasks_from: pip | ||
vars: | ||
package_names: pip_search | ||
package_names: [pip_search] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
- name: Install rtx | ||
ansible.builtin.get_url: | ||
url: | ||
"https://github.com/jdx/rtx/releases/download/\ | ||
{{ rtx_version }}/\ | ||
rtx-\ | ||
{{ rtx_version }}-\ | ||
{{ ansible_system | lower }}-{{ rtx_architecture }}" | ||
dest: /home/aki/.local/bin/rtx | ||
owner: aki | ||
group: aki | ||
mode: 0700 | ||
register: result | ||
retries: 10 | ||
delay: 2 | ||
until: result is success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
- name: Set plugin names | ||
ansible.builtin.set_fact: | ||
rtx_plugins_names: "{{ rtx_plugins | map(attribute='name') | list }}" | ||
|
||
- name: Install "nodejs" rtx plugin dependencies | ||
ansible.builtin.package: | ||
name: | ||
- dirmngr | ||
- gpg | ||
when: "'nodejs' in rtx_plugins_names" | ||
|
||
# Needed by the python plugin due to pyenv | ||
# See: https://github.com/pyenv/pyenv/wiki#suggested-build-environment | ||
- name: Install "python" rtx plugin dependencies | ||
ansible.builtin.package: | ||
name: | ||
- libbz2-dev | ||
- libffi-dev | ||
- liblzma-dev | ||
- libncursesw5-dev | ||
- libsqlite3-dev | ||
- libssl-dev | ||
- libxml2-dev | ||
- libxmlsec1-dev | ||
- llvm | ||
- tk-dev | ||
- xz-utils | ||
- zlib1g-dev | ||
when: "'python' in rtx_plugins_names" | ||
|
||
- name: Install "aki" user rtx plugins | ||
become_user: aki | ||
ansible.builtin.command: | ||
cmd: >- | ||
zsh -c " | ||
rtx use --global --yes | ||
{{ | ||
rtx_plugins | | ||
map(attribute='name') | | ||
zip(rtx_plugins | map(attribute='version') | map('default', 'latest')) | | ||
map('join', '@') | | ||
join(' ') | ||
}}" | ||
register: rtx_install | ||
retries: 10 | ||
delay: 2 | ||
until: rtx_install is success | ||
changed_when: "'installed' in rtx_install.stdout" | ||
|
||
- name: Discover "aki" user pip executable | ||
become_user: aki | ||
ansible.builtin.command: | ||
cmd: zsh -c "rtx which pip" | ||
register: which_pip | ||
changed_when: false | ||
when: "'python' in rtx_plugins_names" | ||
|
||
- name: Set pip executable | ||
ansible.builtin.set_fact: | ||
pip_executable: "{{ which_pip.stdout }}" | ||
when: "'python' in rtx_plugins_names" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.