Compare commits

..

No commits in common. "6d820db7f588756029c6cb42f200309aaf6cecab" and "5e3f7329d20b3c28289787285737df3ada76eb6e" have entirely different histories.

5 changed files with 35 additions and 69 deletions

View file

@ -96,23 +96,3 @@ Vagrant will bootstrap a VM, install Ansible und run the provisioning from withi
## Default user ## Default user
By default, a `vagrant` user will be provisioned (if not already available) and used throughout the provisioning. The default password is `vagrant`. By default, a `vagrant` user will be provisioned (if not already available) and used throughout the provisioning. The default password is `vagrant`.
## Tips
### Run the provisioning from within the VM on demand
Open a terminal and run:
```
ansible-playbook -i /vagrant/provisioning/inventory.sample /vagrant/provisioning/playbook.yml -c local
```
This will not try to connect to itself via SSH using the defined IP address but instead uses the local connection.
### Keep the Virtualbox Guest Additions up to date with Vagrant
Install the Vagrant plugin `vagrant-vbguest`:
```
vagrant plugin install vagrant-vbguest
```

View file

@ -2,7 +2,7 @@
gathering = smart gathering = smart
fact_caching_connection = ./facts_cache fact_caching_connection = ./facts_cache
fact_caching = jsonfile fact_caching = jsonfile
roles_path = ./roles ansible_roles_path = ./roles
# The timeout is defined in seconds # The timeout is defined in seconds
# This is 2 hours # This is 2 hours
@ -11,4 +11,4 @@ fact_caching_timeout = 7200
[ssh_connection] [ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=18000 -o PreferredAuthentications=publickey ssh_args = -o ControlMaster=auto -o ControlPersist=18000 -o PreferredAuthentications=publickey
control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
pipelining = True pipelining = True

View file

@ -3,6 +3,10 @@
become: yes become: yes
vars: vars:
locales_gen:
- en_US.UTF-8
- de_DE.UTF-8
locales_default: de_DE.UTF-8
ansible_version: "2.9.4" ansible_version: "2.9.4"
pip_install_packages: pip_install_packages:
- name: docker - name: docker
@ -16,6 +20,34 @@
- vagrant - vagrant
pre_tasks: pre_tasks:
- name: Generate locals
locale_gen:
name: "{{ item }}"
state: present
loop: "{{ locales_gen }}"
- name: Get current locale
command: localectl status
register: locale_status
changed_when: false
- name: Extract LANG from current locale configuration
set_fact:
locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}"
- debug:
msg: "{{ locale_lang }}"
- name: Set default locale
command: localectl set-locale LANG={{ locales_default }}
when: locale_lang != locales_default
- name: Replace US repo with DE mirror
replace:
path: /etc/apt/sources.list
regexp: 'us(\.archive\.ubuntu\.com)'
replace: 'de\1'
- name: Install Python3 - name: Install Python3
raw: test -e /usr/bin/python3 || (apt update && apt install -y --force-yes python3) raw: test -e /usr/bin/python3 || (apt update && apt install -y --force-yes python3)
changed_when: false changed_when: false
@ -65,7 +97,5 @@
when: desktop_installed.changed when: desktop_installed.changed
roles: roles:
- jotbe.common
- geerlingguy.pip - geerlingguy.pip
- geerlingguy.docker - geerlingguy.docker
- jotbe.dev-tools

View file

@ -5,8 +5,3 @@
- name: jotbe.common - name: jotbe.common
src: https://git.jotbe.io/jotbe/ansible-role-common.git src: https://git.jotbe.io/jotbe/ansible-role-common.git
scm: git scm: git
- name: jotbe.dev-tools
src: https://git.jotbe.io/jotbe/ansible-role-dev-tools.git
scm: git

View file

@ -1,39 +0,0 @@
---
# tasks file for jotbe.dev-tools
- name: Add key for Sublime Text repo
apt_key:
url: https://download.sublimetext.com/sublimehq-pub.gpg
state: present
- name: Add repository for Sublime Text
apt_repository:
repo: deb https://download.sublimetext.com/ apt/stable/
state: present
- name: Add key for VSCodium repo
apt_key:
url: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
state: present
- name: Add repository for VSCodium
apt_repository:
repo: deb https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/debs/ vscodium main
state: present
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 7200
- name: Install Sublime Text
apt:
pkg:
- sublime-text
register: sublime_text_installed
- name: Install VSCodium
apt:
pkg:
- codium
register: vscodium_installed