fixing variable usage and deploying to headless machine
This commit is contained in:
@@ -25,3 +25,12 @@
|
||||
- tree
|
||||
- unzip
|
||||
- zsh
|
||||
|
||||
- name: set up tools specifically for headless systems
|
||||
when: headless
|
||||
become: true
|
||||
ansible.builtin.apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- emacs-nox
|
||||
- vim-nox
|
||||
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
go_version: 1.20.3
|
||||
bazelisk_version: 1.16.0
|
||||
dev_embedded: False
|
||||
dev_full: False
|
||||
dev_rust: False
|
||||
dev_virt: False
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
- cloc
|
||||
- cmake
|
||||
- devscripts
|
||||
- erlang
|
||||
- gcc
|
||||
- golang-google-genproto-dev
|
||||
- golang-goprotobuf-dev
|
||||
@@ -28,6 +27,20 @@
|
||||
- zlib1g
|
||||
- zlib1g-dev
|
||||
|
||||
- name: install dev tools with guis
|
||||
when: not headless
|
||||
become: true
|
||||
ansible.builtin.apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- erlang
|
||||
|
||||
- name: install headless dev tools
|
||||
when: headless
|
||||
become: true
|
||||
ansible.builtin.apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- erlang-nox
|
||||
|
||||
## golang
|
||||
- name: install godeb
|
||||
become: true
|
||||
@@ -108,15 +121,21 @@
|
||||
- qemu-system-arm
|
||||
- qemu-system
|
||||
- qemu-system-x86
|
||||
- qemu-system-gui
|
||||
- qemu-user-static
|
||||
- sbuild-qemu
|
||||
- seabios
|
||||
- u-boot-qemu
|
||||
- virt-manager
|
||||
- virt-top
|
||||
notify: "restart docker service"
|
||||
|
||||
- name: install container and virtualisation GUIs
|
||||
when: (dev_virt or dev_full) and not headless
|
||||
become: true
|
||||
ansible.builtin.apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- qemu-system-gui
|
||||
- virt-manager
|
||||
|
||||
- name: Ensure kvm group exists
|
||||
when: dev_virt or dev_full
|
||||
become: true
|
||||
@@ -158,10 +177,15 @@
|
||||
- gcc-avr
|
||||
- libstdc++-arm-none-eabi-newlib
|
||||
- picocom
|
||||
|
||||
- name: install embedded dev guis
|
||||
when: (dev_virt or dev_full) and not headless
|
||||
become: true
|
||||
ansible.builtin.apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- pulseview
|
||||
- sigrok
|
||||
|
||||
|
||||
## documentation stuff
|
||||
- name: install documentation tooling
|
||||
become: true
|
||||
@@ -176,7 +200,7 @@
|
||||
|
||||
## vscode
|
||||
- name: add VS Code repo key
|
||||
when: dev_full
|
||||
when: dev_full and not headless
|
||||
become: true
|
||||
ansible.builtin.apt_key:
|
||||
url: https://packages.microsoft.com/keys/microsoft.asc
|
||||
@@ -184,7 +208,7 @@
|
||||
validate_certs: yes
|
||||
|
||||
- name: add VS Code repo
|
||||
when: dev_full
|
||||
when: dev_full and not headless
|
||||
become: true
|
||||
ansible.builtin.apt_repository:
|
||||
repo: deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
|
||||
@@ -192,20 +216,20 @@
|
||||
validate_certs: yes
|
||||
|
||||
- name: install VS Code
|
||||
when: dev_full
|
||||
when: dev_full and not headless
|
||||
become: true
|
||||
ansible.builtin.apt: name=code state=present
|
||||
|
||||
## rust
|
||||
|
||||
- name: check if cargo is installed
|
||||
when: dev_full
|
||||
when: dev_rust or dev_full
|
||||
shell: command -v cargo
|
||||
register: cargo_exists
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Download Installer
|
||||
when: dev_full and cargo_exists is failed
|
||||
when: (dev_rust or dev_full) and (cargo_exists is failed)
|
||||
get_url:
|
||||
url: https://sh.rustup.rs
|
||||
dest: /tmp/sh.rustup.rs
|
||||
@@ -213,7 +237,7 @@
|
||||
force: 'yes'
|
||||
|
||||
- name: install rust/cargo
|
||||
when: dev_full and cargo_exists is failed
|
||||
when: (dev_rust or dev_full) and (cargo_exists is failed)
|
||||
shell: /tmp/sh.rustup.rs -y
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user