Basics in place, Fedora is done

This commit is contained in:
Anthony Cicchetti 2019-07-30 18:33:57 -04:00
parent 10e5e6b773
commit 67cc66c82d
28 changed files with 136 additions and 51 deletions

View file

@ -2,16 +2,20 @@
- name: Ask user for the input
hosts: localhost
tags: always
vars_prompt:
- name: _dev_machine
prompt: "Is this a developer's machine?"
private: no
default: "yes"
- name: _rust_extras
prompt: "Do you want to install rust extras?"
private: no
default: "no"
tasks:
- block:
- debug:
var: dev_machine
- name: Dev Machine prompt
pause:
prompt: "Is this a developer's machine? yes|no"
register: _dev_machine
when:
- dev_machine == 'yes'
- name: Set dev machine fact based on input
- name: Set dev machine fact
set_fact:
dev_machine: "{{ _dev_machine }}"
_dev_machine: "{{ _dev_machine }}"
- name: Set rust extras fact
set_fact:
_rust_extras: "{{ _rust_extras }}"

View file

@ -1,6 +1,6 @@
---
# - name: Include prompts playbook
# import_playbook: input.yml
- name: Include prompts playbook
import_playbook: input.yml
- name: Find out what kind of host we are
hosts: all
@ -12,11 +12,21 @@
- hosts: os_MacOSX
gather_facts: True
roles:
- common
- macos
- role: macos
vars:
- dev_machine: "{{ _dev_machine }}"
- role: common
vars:
- dev_machine: "{{ _dev_machine }}"
- rust_extras: "{{ _rust_extras }}"
- hosts: os_Fedora
gather_facts: True
roles:
- common
- fedora
- role: fedora
vars:
dev_machine: "{{ _dev_machine }}"
- role: common
vars:
- dev_machine: "{{ _dev_machine }}"
- rust_extras: "{{ _rust_extras }}"

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -1,18 +1,44 @@
---
- debug:
var: dev_machine
- import_tasks: anyenv.yml
- import_role:
name: anyenv
when:
- dev_machine == 'yes'
# - import_tasks: neovim.yml
# - import_tasks: rust.yml
# - import_tasks: tmux.yml
# - import_tasks: alacritty.yml
# - import_tasks: hyper.yml
# - import_tasks: kerl.yml
- import_tasks: git.yml
# - import_tasks: zsh.yml
# - import_tasks: sdkman.yml
- dev_machine == true
- import_role:
name: neovim
- import_role:
name: rust
vars:
- rust_extras: rust_extras
when:
- dev_machine == true
- import_role:
name: tmux
when:
- dev_machine == true
- import_role:
name: alacritty
when:
- dev_machine == true
- import_role:
name: hyper
when:
- dev_machine == true
- import_role:
name: kerl
when:
- dev_machine == true
- import_role:
name: git
when:
- dev_machine == "yes"
- import_role:
name: zsh
- import_role:
name: sdkman
when:
- dev_machine == true
- name: Create ~/bin directory

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -1,28 +1,32 @@
---
# - name: Update Packages
# become: yes
# become_method: sudo
# dnf:
# name: "*"
# state: latest
- name: Update Packages
become: yes
become_method: sudo
dnf:
name: "*"
state: latest
# - name: Install neovim
# become: yes
# become_method: sudo
# dnf:
# name: "neovim"
# state: latest
- name: Install basics
become: yes
become_method: sudo
dnf:
name:
- zsh
- git
- cmake
- tmux
- gpg
- neovim
state: latest
# - name: Install @development-tools
# become: yes
# become_method: sudo
# dnf:
# name: "@development-tools"
# state: latest
- name: Install @development-tools
when:
- dev_machine == true
become: yes
become_method: sudo
dnf:
name:
- "@development-tools"
- openssl-dev
state: latest
# - name: Install openssl-dev
# become: yes
# become_method: sudo
# dnf:
# name: "openssl-devel"
# state: latest

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,3 @@
---
dev_machine: yes
rust_extras: no

View file

@ -14,28 +14,40 @@
shell: ~/.cargo/bin/cargo install ripgrep
args:
creates: ~/.cargo/bin/rg
when:
- rust_extras == true
- name: Install exa
shell: ~/.cargo/bin/cargo install exa
args:
creates: ~/.cargo/bin/exa
when:
- rust_extras == true
- name: Install just
shell: ~/.cargo/bin/cargo install just
args:
creates: ~/.cargo/bin/just
when:
- rust_extras == true
- name: Install cargo-update
shell: ~/.cargo/bin/cargo install cargo-update
args:
creates: ~/.cargo/bin/cargo-install-update
when:
- rust_extras == true
- name: Install bat
shell: ~/.cargo/bin/cargo install bat
args:
creates: ~/.cargo/bin/bat
when:
- rust_extras == true
- name: Install rls
shell: ~/.cargo/bin/rustup component add rls-preview rust-analysis rust-src
args:
creates: ~/.cargo/bin/rls
when:
- rust_extras == true

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes

View file

@ -0,0 +1,2 @@
---
dev_machine: yes