Skip to content

Instantly share code, notes, and snippets.

@aheil
Created January 7, 2020 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheil/387336a46938ff5c53ea51a1591f6ca5 to your computer and use it in GitHub Desktop.
Save aheil/387336a46938ff5c53ea51a1591f6ca5 to your computer and use it in GitHub Desktop.
exa Ansible role
---
- name: Make sure packages are installed
apt:
name:
- libgit2-27
- cmake
state: present
tags:
- wsl
- exa
- name: Create directory for Rust
file:
path: "{{ RUST_DIR }}"
state: directory
tags:
- wsl
- exa
- name: Download rust installation script
get_url:
url: https://sh.rustup.rs
dest: "{{ RUST_DIR }}"
mode: a+x
tags:
- wsl
- exa
- name: Install Rust
become: yes
# Unatendet installation: https://github.com/rust-lang/rustup/issues/297
command: "./rustup-init.sh -y"
args:
chdir: "{{ RUST_DIR }}"
tags:
- wsl
- exa
# To download the latest version, run: git clone https://github.com/­ogham/exa.git
- name: Clone exa repository
git:
repo: https://github.com/ogham/exa.git
dest: "{{ EXA_DIR }}"
tags:
- wsl
- exa
# To configure your current shell run source $HOME/.cargo/env
# which says PATH: "$HOME/.cargo/bin:$PATH"
- name: Run 'install' target
become: yes
make:
chdir: "{{ EXA_DIR }}"
target: install
environment:
PATH: "{{ lookup('env','HOME') }}/.cargo/bin:{{ ansible_env.PATH }}"
tags:
- wsl
- exa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment