Basics in place, Fedora is done
This commit is contained in:
parent
10e5e6b773
commit
67cc66c82d
28 changed files with 136 additions and 51 deletions
|
@ -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 }}"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
2
playbook/roles/alacritty/defaults/main.yml
Normal file
2
playbook/roles/alacritty/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/anyenv/defaults/main.yml
Normal file
2
playbook/roles/anyenv/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/arch/defaults/main.yml
Normal file
2
playbook/roles/arch/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
|
@ -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
|
||||
|
|
2
playbook/roles/fedora/defaults/main.yml
Normal file
2
playbook/roles/fedora/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
|
@ -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
|
||||
|
|
2
playbook/roles/git/defaults/main.yml
Normal file
2
playbook/roles/git/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/hyper/defaults/main.yml
Normal file
2
playbook/roles/hyper/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/kerl/defaults/main.yml
Normal file
2
playbook/roles/kerl/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/macos/defaults/main.yml
Normal file
2
playbook/roles/macos/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/neovim/defaults/main.yml
Normal file
2
playbook/roles/neovim/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
3
playbook/roles/rust/defaults/main.yml
Normal file
3
playbook/roles/rust/defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dev_machine: yes
|
||||
rust_extras: no
|
|
@ -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
|
2
playbook/roles/sdkman/defaults/main.yml
Normal file
2
playbook/roles/sdkman/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/tmux/defaults/main.yml
Normal file
2
playbook/roles/tmux/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/ubuntu/defaults/main.yml
Normal file
2
playbook/roles/ubuntu/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
2
playbook/roles/zsh/defaults/main.yml
Normal file
2
playbook/roles/zsh/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
dev_machine: yes
|
Loading…
Add table
Reference in a new issue