This commit is contained in:
sfigato 2021-02-23 18:56:01 +01:00
commit 076e060943
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
3 changed files with 57 additions and 0 deletions

40
tasks/main.yaml Normal file
View File

@ -0,0 +1,40 @@
---
- name: Upgrade distro
apt: update_cache=yes upgrade=yes cache_valid_time=1800
tags: never
- name: Show current host's hostname (from inventory)
debug: var=inventory_hostname
- name: Set hostname
hostname:
name: "{{ inventory_hostname }}"
- name: Install base pkgs
apt:
name: "{{ base_pkgs }}"
state: present
- name: Set Europe/Rome timezone
timezone:
name: Europe/Rome
- name: Ensure fd link exists
file:
src: /usr/bin/fdfind
dest: /usr/local/bin/fd
state: link
- name: Ensure locale.get is populated with the wanted locales
template:
src: locale.gen.j2
dest: /etc/locale.gen
mode: 0644
owner: root
group: root
- name: Build locales
locale_gen:
name: "{{ item.name }}"
state: present
loop: "{{ base_locales }}"

3
templates/locale.gen.j2 Normal file
View File

@ -0,0 +1,3 @@
{% for locale in base_locales %}
{{ locale.name }} {{ locale.type }}
{% endfor %}

14
vars/main.yaml Normal file
View File

@ -0,0 +1,14 @@
---
base_pkgs:
- zsh
- curl
- htop
- tmux
- vim
- git
- ripgrep
- fd-find
- mosh
- locales
base_locales:
- {name: "en_US.UTF-8", type: "UTF-8"}