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
|
- name: Ask user for the input
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
tags: always
|
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:
|
tasks:
|
||||||
- block:
|
- block:
|
||||||
- debug:
|
- name: Set dev machine fact
|
||||||
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
|
|
||||||
set_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
|
- name: Include prompts playbook
|
||||||
# import_playbook: input.yml
|
import_playbook: input.yml
|
||||||
|
|
||||||
- name: Find out what kind of host we are
|
- name: Find out what kind of host we are
|
||||||
hosts: all
|
hosts: all
|
||||||
|
@ -12,11 +12,21 @@
|
||||||
- hosts: os_MacOSX
|
- hosts: os_MacOSX
|
||||||
gather_facts: True
|
gather_facts: True
|
||||||
roles:
|
roles:
|
||||||
- common
|
- role: macos
|
||||||
- macos
|
vars:
|
||||||
|
- dev_machine: "{{ _dev_machine }}"
|
||||||
|
- role: common
|
||||||
|
vars:
|
||||||
|
- dev_machine: "{{ _dev_machine }}"
|
||||||
|
- rust_extras: "{{ _rust_extras }}"
|
||||||
|
|
||||||
- hosts: os_Fedora
|
- hosts: os_Fedora
|
||||||
gather_facts: True
|
gather_facts: True
|
||||||
roles:
|
roles:
|
||||||
- common
|
- role: fedora
|
||||||
- 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:
|
- debug:
|
||||||
var: dev_machine
|
var: dev_machine
|
||||||
- import_tasks: anyenv.yml
|
- import_role:
|
||||||
|
name: anyenv
|
||||||
when:
|
when:
|
||||||
- dev_machine == 'yes'
|
- dev_machine == true
|
||||||
# - import_tasks: neovim.yml
|
- import_role:
|
||||||
# - import_tasks: rust.yml
|
name: neovim
|
||||||
# - import_tasks: tmux.yml
|
- import_role:
|
||||||
# - import_tasks: alacritty.yml
|
name: rust
|
||||||
# - import_tasks: hyper.yml
|
vars:
|
||||||
# - import_tasks: kerl.yml
|
- rust_extras: rust_extras
|
||||||
- import_tasks: git.yml
|
when:
|
||||||
# - import_tasks: zsh.yml
|
- dev_machine == true
|
||||||
# - import_tasks: sdkman.yml
|
- 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
|
- 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
|
- name: Update Packages
|
||||||
# become: yes
|
become: yes
|
||||||
# become_method: sudo
|
become_method: sudo
|
||||||
# dnf:
|
dnf:
|
||||||
# name: "*"
|
name: "*"
|
||||||
# state: latest
|
state: latest
|
||||||
|
|
||||||
# - name: Install neovim
|
- name: Install basics
|
||||||
# become: yes
|
become: yes
|
||||||
# become_method: sudo
|
become_method: sudo
|
||||||
# dnf:
|
dnf:
|
||||||
# name: "neovim"
|
name:
|
||||||
# state: latest
|
- zsh
|
||||||
|
- git
|
||||||
|
- cmake
|
||||||
|
- tmux
|
||||||
|
- gpg
|
||||||
|
- neovim
|
||||||
|
state: latest
|
||||||
|
|
||||||
# - name: Install @development-tools
|
- name: Install @development-tools
|
||||||
# become: yes
|
when:
|
||||||
# become_method: sudo
|
- dev_machine == true
|
||||||
# dnf:
|
become: yes
|
||||||
# name: "@development-tools"
|
become_method: sudo
|
||||||
# state: latest
|
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
|
shell: ~/.cargo/bin/cargo install ripgrep
|
||||||
args:
|
args:
|
||||||
creates: ~/.cargo/bin/rg
|
creates: ~/.cargo/bin/rg
|
||||||
|
when:
|
||||||
|
- rust_extras == true
|
||||||
|
|
||||||
- name: Install exa
|
- name: Install exa
|
||||||
shell: ~/.cargo/bin/cargo install exa
|
shell: ~/.cargo/bin/cargo install exa
|
||||||
args:
|
args:
|
||||||
creates: ~/.cargo/bin/exa
|
creates: ~/.cargo/bin/exa
|
||||||
|
when:
|
||||||
|
- rust_extras == true
|
||||||
|
|
||||||
- name: Install just
|
- name: Install just
|
||||||
shell: ~/.cargo/bin/cargo install just
|
shell: ~/.cargo/bin/cargo install just
|
||||||
args:
|
args:
|
||||||
creates: ~/.cargo/bin/just
|
creates: ~/.cargo/bin/just
|
||||||
|
when:
|
||||||
|
- rust_extras == true
|
||||||
|
|
||||||
- name: Install cargo-update
|
- name: Install cargo-update
|
||||||
shell: ~/.cargo/bin/cargo install cargo-update
|
shell: ~/.cargo/bin/cargo install cargo-update
|
||||||
args:
|
args:
|
||||||
creates: ~/.cargo/bin/cargo-install-update
|
creates: ~/.cargo/bin/cargo-install-update
|
||||||
|
when:
|
||||||
|
- rust_extras == true
|
||||||
|
|
||||||
- name: Install bat
|
- name: Install bat
|
||||||
shell: ~/.cargo/bin/cargo install bat
|
shell: ~/.cargo/bin/cargo install bat
|
||||||
args:
|
args:
|
||||||
creates: ~/.cargo/bin/bat
|
creates: ~/.cargo/bin/bat
|
||||||
|
when:
|
||||||
|
- rust_extras == true
|
||||||
|
|
||||||
- name: Install rls
|
- name: Install rls
|
||||||
shell: ~/.cargo/bin/rustup component add rls-preview rust-analysis rust-src
|
shell: ~/.cargo/bin/rustup component add rls-preview rust-analysis rust-src
|
||||||
args:
|
args:
|
||||||
creates: ~/.cargo/bin/rls
|
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