feat: add roles for golang, python and docker
This commit is contained in:
parent
bf8ca32e9d
commit
efc7bee90b
4 changed files with 37 additions and 42 deletions
46
dev.yml
46
dev.yml
|
@ -1,44 +1,6 @@
|
||||||
- name: Development environment
|
- name: Development environment
|
||||||
hosts: odhosts
|
hosts: odhosts
|
||||||
tasks:
|
roles:
|
||||||
- name: Install essential cmd tools - alacritty, git, tmux,
|
- golang
|
||||||
become: true
|
- python
|
||||||
ansible.builtin.apt:
|
- docker
|
||||||
pkg:
|
|
||||||
- alacritty
|
|
||||||
- git
|
|
||||||
- tmux
|
|
||||||
- name: Install build tools - make, cmake, gcc, g++, clang, libc6-dev
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt:
|
|
||||||
pkg:
|
|
||||||
- make
|
|
||||||
- cmake
|
|
||||||
- gcc
|
|
||||||
- g++
|
|
||||||
- clang
|
|
||||||
- libc6-dev
|
|
||||||
- name: Enable debian bookworm backports
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt_repository:
|
|
||||||
repo: deb http://deb.debian.org/debian bookworm-backports main
|
|
||||||
state: present
|
|
||||||
filename: backports
|
|
||||||
- name: Install golang from backports
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: golang
|
|
||||||
default_release: bookworm-backports
|
|
||||||
- name: Install python
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt:
|
|
||||||
pkg:
|
|
||||||
- python3
|
|
||||||
- python3-venv
|
|
||||||
- python3-pip
|
|
||||||
- name: Install docker and docker-compose
|
|
||||||
become: true
|
|
||||||
ansible.builtin.apt:
|
|
||||||
pkg:
|
|
||||||
- docker
|
|
||||||
- docker-compose
|
|
||||||
|
|
11
roles/docker/tasks/main.yml
Normal file
11
roles/docker/tasks/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
- name: Install docker and docker-compose
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
pkg:
|
||||||
|
- docker
|
||||||
|
- docker-compose
|
||||||
|
- name: Disable docker service autostart
|
||||||
|
become: true
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
name: docker
|
||||||
|
enabled: false
|
15
roles/golang/tasks/main.yml
Normal file
15
roles/golang/tasks/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
- name: Enable debian bookworm backports
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt_repository:
|
||||||
|
repo: deb http://deb.debian.org/debian bookworm-backports main
|
||||||
|
state: present
|
||||||
|
filename: backports
|
||||||
|
- name: Install golang 1.22 from backports
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: golang-1.22
|
||||||
|
default_release: bookworm-backports
|
||||||
|
- name: Install go language server - gopls
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: gopls
|
7
roles/python/tasks/main.yml
Normal file
7
roles/python/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- name: Install python
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
pkg:
|
||||||
|
- python3
|
||||||
|
- python3-venv
|
||||||
|
- python3-pip
|
Loading…
Reference in a new issue