feat(development): added rust setup
This commit is contained in:
parent
c697898e0c
commit
223cbfb877
3 changed files with 30 additions and 1 deletions
|
@ -2,3 +2,4 @@
|
||||||
custom_github_token: ""
|
custom_github_token: ""
|
||||||
development_docker_remap_user: "{{ custom_base_user_account }}"
|
development_docker_remap_user: "{{ custom_base_user_account }}"
|
||||||
development_docker_remap_group: "{{ custom_base_user_account }}"
|
development_docker_remap_group: "{{ custom_base_user_account }}"
|
||||||
|
development_install_rust: false
|
||||||
|
|
|
@ -327,3 +327,29 @@
|
||||||
- venv: "flake8"
|
- venv: "flake8"
|
||||||
extension: "pep8-naming"
|
extension: "pep8-naming"
|
||||||
creates: "pep8ext_naming.py"
|
creates: "pep8ext_naming.py"
|
||||||
|
|
||||||
|
- name: '[rust] check if rust is already installed'
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ getent_passwd[custom_base_user_account][4] }}/.cargo/bin/rustc"
|
||||||
|
register: rustc_stat
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
when: development_install_rust | bool
|
||||||
|
|
||||||
|
- name: '[rust] rust'
|
||||||
|
become: true
|
||||||
|
when: development_install_rust | bool and rustc_stat.state is match("absent")
|
||||||
|
block:
|
||||||
|
- name: '[rust] download installer'
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: https://sh.rustup.rs
|
||||||
|
dest: /tmp/rustup.sh
|
||||||
|
mode: '0750'
|
||||||
|
owner: "{{ custom_base_user_account }}"
|
||||||
|
group: "{{ custom_base_user_account }}"
|
||||||
|
|
||||||
|
- name: '[rust] install rust toolchain'
|
||||||
|
become_user: "{{ custom_base_user_account }}"
|
||||||
|
script:
|
||||||
|
cmd: /tmp/rustup.sh -qy
|
||||||
|
creates: "{{ getent_passwd[custom_base_user_account][4] }}/.cargo/bin/rustc"
|
||||||
|
|
|
@ -17,3 +17,5 @@ common_gitconfig_email: "{{ vault_common_gitconfig_email }}"
|
||||||
common_gitconfig_force_sign: true
|
common_gitconfig_force_sign: true
|
||||||
common_gitconfig_signingkey: "{{ vault_common_gitconfig_signingkey }}"
|
common_gitconfig_signingkey: "{{ vault_common_gitconfig_signingkey }}"
|
||||||
common_install_fonts: true
|
common_install_fonts: true
|
||||||
|
|
||||||
|
development_install_rust: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue