You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
2.7 KiB
116 lines
2.7 KiB
---
|
|
- hosts: all
|
|
pre_tasks:
|
|
- name: update dotfiles repo
|
|
git:
|
|
repo: https://github.com/kejadlen/dotfiles.git
|
|
dest: ~/.dotfiles
|
|
ignore_errors: yes
|
|
tasks:
|
|
- name: install dependencies
|
|
become: yes
|
|
apt:
|
|
name: "{{ item }}"
|
|
update_cache: yes
|
|
with_items:
|
|
- cmake
|
|
- direnv
|
|
- make
|
|
- mosh
|
|
- libterm-readkey-perl
|
|
- pkg-config
|
|
- python3-pip
|
|
- software-properties-common
|
|
- zsh
|
|
|
|
- hosts: all
|
|
roles:
|
|
- dotfiles
|
|
- zsh
|
|
|
|
- import_playbook: docker.yml
|
|
- import_playbook: js.yml
|
|
- import_playbook: nginx.yml
|
|
|
|
- hosts: all
|
|
tasks:
|
|
- name: create home dirs
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- src
|
|
- tmp
|
|
|
|
- name: install Ansible
|
|
block:
|
|
- apt_repository:
|
|
repo: ppa:ansible/ansible
|
|
become: yes
|
|
- apt:
|
|
name: ansible
|
|
update_cache: yes
|
|
become: yes
|
|
|
|
- name: install Ruby
|
|
block:
|
|
- stat: path=/usr/local/bin/chruby-exec
|
|
register: chruby
|
|
- import_tasks: chruby.yml
|
|
vars:
|
|
version: 0.3.9
|
|
when: chruby.stat.exists == False
|
|
|
|
- stat: path=/usr/local/bin/ruby-install
|
|
register: ruby_install
|
|
- import_tasks: ruby-install.yml
|
|
vars:
|
|
version: 0.6.1
|
|
when: ruby_install.stat.exists == False
|
|
|
|
- stat: path=~/.rubies
|
|
register: rubies
|
|
- command: ruby-install ruby
|
|
when: rubies.stat.exists == False
|
|
|
|
- name: install Rust
|
|
block:
|
|
- stat: path=~/.cargo/bin/rustup
|
|
register: rustup
|
|
- import_tasks: rustup.yml
|
|
when: rustup.stat.exists == False
|
|
|
|
- command: ~/.cargo/bin/rustup toolchain list
|
|
register: rustup_toolchains
|
|
- name: install rust
|
|
command: ~/.cargo/bin/rustup install nightly
|
|
when: "'nightly' not in rustup_toolchains.stdout"
|
|
|
|
- name: default to nightly
|
|
command: ~/.cargo/bin/rustup default nightly
|
|
|
|
# - name: install Rust-based tools
|
|
# command: ~/.cargo/bin/cargo install {{ item }}
|
|
# with_items:
|
|
# - exa
|
|
# - ripgrep
|
|
|
|
- name: install fzf
|
|
block:
|
|
- git:
|
|
repo: https://github.com/junegunn/fzf.git
|
|
dest: ~/.fzf
|
|
- command: ~/.fzf/install
|
|
|
|
- name: link .zshrc.local
|
|
file:
|
|
src: ~/.dotfiles/ansible/irregular-apocalypse/.zshrc.local
|
|
dest: ~/.zshrc.local
|
|
state: link
|
|
|
|
- name: link SSH config.local
|
|
file:
|
|
src: ~/.dotfiles/ansible/irregular-apocalypse/.ssh/config.local
|
|
dest: ~/.ssh/config.local
|
|
state: link
|