feat: add roles for golang, python and docker

This commit is contained in:
Ivan R. 2024-04-26 23:49:05 +05:00
parent bf8ca32e9d
commit efc7bee90b
Signed by: lumin
GPG key ID: E0937DC7CD6D3817
4 changed files with 37 additions and 42 deletions

46
dev.yml
View file

@ -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

View 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

View 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

View file

@ -0,0 +1,7 @@
- name: Install python
become: true
ansible.builtin.apt:
pkg:
- python3
- python3-venv
- python3-pip